button 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6d9c3c195c22e1c66ab773872b2e581f64d2f8ba
4
- data.tar.gz: 25e56b4381a65df330ca1fa640d9b949fe16999d
3
+ metadata.gz: e480304741478a2d317831ace7b121e1432430ec
4
+ data.tar.gz: 86b680b7cd66e1409ff691b2f045cc6a4a62419d
5
5
  SHA512:
6
- metadata.gz: e84daef595db0ddf8fcf6c1f71f9347a487a37cbbff57664e5b8df1f6d35dad060088313945ea50d6b9838b7dabf68d093820a53be97abf039d727c04a9c5770
7
- data.tar.gz: 7198f6f31795f34485bd727b320dfc251a27cf71d64077d7cf64ff6efe086a363e399b14e4eb93a045ad753f7a217eea53464c3e3d91f267a13a4ce63ab77d28
6
+ metadata.gz: bf29031a04f3dccafa98dcaa330f1f63a2075824f4754dc94ab585e645f4b65bb25fec33761de3a1e693c783ecfd7cc0b6ef6e2b57b854d5d320b0ee930cf22a
7
+ data.tar.gz: 1c1b920efe6e4bdc23adb08030825ff1b2c21c7e911647419b9dc468258192afb38520cf5f258ebebe97a3a1ce819ab9eca0321653d0ec1645a08aea9c6858c7
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ 2.2.0 March 29, 2017
2
+ - Add GET support for `Customers` resource
3
+
1
4
  2.1.0 March 29, 2017
2
5
  - Add `Customers` resource
3
6
 
data/README.md CHANGED
@@ -145,6 +145,18 @@ response = client.customers.create({
145
145
  puts response
146
146
  # => Button::Response(id: internal-customer-id, email_sha256: a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3)
147
147
  ```
148
+ ##### Get
149
+
150
+ ```ruby
151
+ require 'button'
152
+
153
+ client = Button::Client.new('sk-XXX')
154
+
155
+ response = client.customers.get('btncustomer-XXX')
156
+
157
+ puts response
158
+ # => Button::Response(id: btncustomer-XXX, segments:[], ... )
159
+ ```
148
160
 
149
161
  ### Merchants
150
162
 
@@ -9,6 +9,15 @@ module Button
9
9
  '/v1/customers'
10
10
  end
11
11
 
12
+ # Gets a customer
13
+ #
14
+ # @param [String] customer_id the customer id
15
+ # @return [Button::Response] the API response
16
+ #
17
+ def get(customer_id)
18
+ api_get(path(customer_id))
19
+ end
20
+
12
21
  # Create a Customer
13
22
  #
14
23
  # @param [Hash] customer the customer to create
@@ -1,3 +1,3 @@
1
1
  module Button
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.2.0'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: button
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Button
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-29 00:00:00.000000000 Z
11
+ date: 2017-03-30 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Button is a contextual acquisition channel and closed-loop attribution
14
14
  and affiliation system for mobile commerce.