billimatic-client 0.6.0 → 0.7.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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Yjg0MzEzZjNmMjhlNTJjNDVjNmVjYjQzNDZhMGYzMjI0MDc0MDExNw==
4
+ ZmZiMmU5NDA5NjhiMTQ3OGY0NmQxYWU5YzE0N2VhNTZhZjgzOTFlMQ==
5
5
  data.tar.gz: !binary |-
6
- N2YyNzYxMDViYmI5MTk1MTBkYmIwMjJiZGVmMjRkMTJhODZmYmM3Nw==
6
+ ZDMyMDdjYWFkZWEzMDk0ZDA5NmU1OWFiMDJiYmU1YWY4NWZlYjhlNA==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NGQ2ODgxOGJiNzM2ODY3ZDQ0MzI5OGM1MjJjNDdlNTg3MTNjNTI5MmUzZTRi
10
- ZjM0ZDg3Zjg4MzI3ZWJjZTVhNWY2ZWMxZTAyOGQ0ZGM0NTdiYzdhNDZiMWQ4
11
- YzVkMTE0NjA1NmVlZGZiOWExMThjNzlmMjhmZDVhNWFkZTQzNzA=
9
+ MTQ1YzdhNzNlY2ZiNDc5ODNmN2QzMGZiOTQ2YjEyYjFiNDE5MDAxNzNkYzQ1
10
+ ZGZhZGNjYjZiMjlkNzczMjYwMjFkNzc3Y2ZjNzExYjBlNDFmYTc4N2E5NjVl
11
+ MDY5YjA0MjAzYmIzZjI2ZWUwMzRlMWRmMWQxMzc5NTFjYmJmNTk=
12
12
  data.tar.gz: !binary |-
13
- ZmQ2YTMwMjA0YTg5Mzg2NDg0YzI3YTI3ODYyYmRkY2ExMTc3M2ZhNWYyYTZl
14
- ZTdjY2Y4NGQxNzBmNjYxZjRlMDJmN2U0YzZiYTFlZTg3ZGE0NjdlYTg1M2E1
15
- Y2U2MzZhMzQ5ZjcyNjYxYjBhNWJmN2UyMTlkN2FiYTQ0NGVlM2M=
13
+ MzA3YzZmY2YxMjcwNWQ0MzA3YWQ4MmE2MmVmZGQ2MTBkNDQ4NWEzMmZiM2U5
14
+ MDNiZjg3MzFiYjI3YWU2MWU2OGY4NmU2OWFlNmE3MTg2N2UxMTQ5M2MwNDhi
15
+ N2NmYWEwNTZjM2QxOTc4NjJhNmExZGNlMjE4ODczOGJhMjAzNDM=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billimatic-client (0.6.0)
4
+ billimatic-client (0.7.0)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8)
7
7
  virtus (~> 1.0.5)
data/README.md CHANGED
@@ -196,6 +196,17 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
196
196
  <code>client.subscriptions.create(attributes_hash)</code>
197
197
  </td>
198
198
  </tr>
199
+ <tr>
200
+ <td><code>POST</code></td>
201
+ <td>
202
+ <a href="https://app.billimatic.com.br/docs/api#!/checkouts/API_V1_Subscription_Checkouts_create_post_0" target="_blank">
203
+ /api/v1/subscriptions/checkout/:token
204
+ </a>
205
+ </td>
206
+ <td>
207
+ <code>client.subscriptions.checkout(attributes_hash, token: token)</code>
208
+ </td>
209
+ </tr>
199
210
  <tr>
200
211
  <td><code>PATCH</code></td>
201
212
  <td>
@@ -9,6 +9,14 @@ module Billimatic
9
9
  end
10
10
  end
11
11
 
12
+ def checkout(params, token:)
13
+ http.post(
14
+ "#{resource_base_path}/checkout/#{token}", body: { subscription: params }
15
+ ) do |response|
16
+ respond_with_entity response
17
+ end
18
+ end
19
+
12
20
  def cancel(token:)
13
21
  http.patch("#{resource_base_path}/#{token}/cancel") do |response|
14
22
  respond_with_entity response
@@ -1,3 +1,3 @@
1
1
  module Billimatic
2
- VERSION = '0.6.0'
2
+ VERSION = '0.7.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billimatic-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Tassinari de Oliveira
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2016-09-26 00:00:00.000000000 Z
13
+ date: 2016-10-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus