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 +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +12 -0
- data/lib/button/resources/customers.rb +9 -0
- data/lib/button/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e480304741478a2d317831ace7b121e1432430ec
|
4
|
+
data.tar.gz: 86b680b7cd66e1409ff691b2f045cc6a4a62419d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf29031a04f3dccafa98dcaa330f1f63a2075824f4754dc94ab585e645f4b65bb25fec33761de3a1e693c783ecfd7cc0b6ef6e2b57b854d5d320b0ee930cf22a
|
7
|
+
data.tar.gz: 1c1b920efe6e4bdc23adb08030825ff1b2c21c7e911647419b9dc468258192afb38520cf5f258ebebe97a3a1ce819ab9eca0321653d0ec1645a08aea9c6858c7
|
data/CHANGELOG.md
CHANGED
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
|
data/lib/button/version.rb
CHANGED
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.
|
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-
|
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.
|