billimatic-client 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmZiMmU5NDA5NjhiMTQ3OGY0NmQxYWU5YzE0N2VhNTZhZjgzOTFlMQ==
4
+ NDdmMjNmYTFhYzJjYWQzZGFmYzhiMjg1MjEyM2JlMzYyYzgxNzZmZA==
5
5
  data.tar.gz: !binary |-
6
- ZDMyMDdjYWFkZWEzMDk0ZDA5NmU1OWFiMDJiYmU1YWY4NWZlYjhlNA==
6
+ MDRjMWZkN2ZlNjIxMWE1ZGNmZTdmNzZlNDEwMmE2NzYwMDM3MzNjMg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MTQ1YzdhNzNlY2ZiNDc5ODNmN2QzMGZiOTQ2YjEyYjFiNDE5MDAxNzNkYzQ1
10
- ZGZhZGNjYjZiMjlkNzczMjYwMjFkNzc3Y2ZjNzExYjBlNDFmYTc4N2E5NjVl
11
- MDY5YjA0MjAzYmIzZjI2ZWUwMzRlMWRmMWQxMzc5NTFjYmJmNTk=
9
+ OWM1ODY1ZDIzYmQwZTg1MjlkMDBhOWVkYTI4ZjFiMmUyNTczNmQxYmJiMDdh
10
+ MTc5MzJmODNjOTg1NTQ5OTAwZjJmNmE5M2I4ZDEyNGYxOGU3YTQzY2IyYTY5
11
+ MDQ5OWY0MjkyODJhMzU5MDQ1YjcwNGY0YzA1NzU4MjU1YjIzZDA=
12
12
  data.tar.gz: !binary |-
13
- MzA3YzZmY2YxMjcwNWQ0MzA3YWQ4MmE2MmVmZGQ2MTBkNDQ4NWEzMmZiM2U5
14
- MDNiZjg3MzFiYjI3YWU2MWU2OGY4NmU2OWFlNmE3MTg2N2UxMTQ5M2MwNDhi
15
- N2NmYWEwNTZjM2QxOTc4NjJhNmExZGNlMjE4ODczOGJhMjAzNDM=
13
+ MTAwNzIzZDUwZTRjNGU5ZWIwYjMzZWIzYzhjMzhjYzlkNTJjYzlhYmI0MjM4
14
+ YmM5MjA1NjM5ZjdiYmJiMTJhYTJmMmRhODI2MjI1ZjM1MDJjYTdkOTBkZDhh
15
+ YjlhMTUxNThlYWFiODI5NzQxM2IzZGNmODA3M2RiM2I4ODk3NzM=
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billimatic-client (0.7.0)
4
+ billimatic-client (0.8.0)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8)
7
7
  virtus (~> 1.0.5)
data/README.md CHANGED
@@ -207,6 +207,17 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
207
207
  <code>client.subscriptions.checkout(attributes_hash, token: token)</code>
208
208
  </td>
209
209
  </tr>
210
+ <tr>
211
+ <td><code>PATCH</code></td>
212
+ <td>
213
+ <a href="https://app.billimatic.com.br/docs/api#!/plan_modifications/API_V1_Subscription_PlanModifications_change_plan_patch_0" target="_blank">
214
+ /api/v1/subscriptions/:token/change_plan
215
+ </a>
216
+ </td>
217
+ <td>
218
+ <code>client.subscriptions.change_plan(token: token, new_plan_id: id)</code>
219
+ </td>
220
+ </tr>
210
221
  <tr>
211
222
  <td><code>PATCH</code></td>
212
223
  <td>
@@ -293,6 +304,17 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
293
304
  <code>client.invoices.search(contract_id: id, issue_date_from: 'dd-mm-yyyy', issue_date_to: 'dd-mm-yyyy')</code>
294
305
  </td>
295
306
  </tr>
307
+ <tr>
308
+ <td><code>GET</code></td>
309
+ <td>
310
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_show_get_2" target="_blank">
311
+ /api/v1/contracts/:contract_id/invoices/:id
312
+ </a>
313
+ </td>
314
+ <td>
315
+ <code>client.invoices.show(id, contract_id: id)</code>
316
+ </td>
317
+ </tr>
296
318
  <tr>
297
319
  <td><code>POST</code></td>
298
320
  <td>
@@ -307,7 +329,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
307
329
  <tr>
308
330
  <td><code>PATCH</code></td>
309
331
  <td>
310
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_update_patch_2" target="_blank">
332
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_update_patch_3" target="_blank">
311
333
  /api/v1/contracts/:contract_id/invoices/:id
312
334
  </a>
313
335
  </td>
@@ -318,7 +340,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
318
340
  <tr>
319
341
  <td><code>DELETE</code></td>
320
342
  <td>
321
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_destroy_delete_3" target="_blank">
343
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_destroy_delete_4" target="_blank">
322
344
  /api/v1/contracts/:contract_id/invoices/:id
323
345
  </a>
324
346
  </td>
@@ -10,6 +10,14 @@ module Billimatic
10
10
  end
11
11
  end
12
12
 
13
+ def show(id, contract_id:)
14
+ http.get(
15
+ "/contracts/#{contract_id}#{resource_base_path}/#{id}"
16
+ ) do |response|
17
+ respond_with_entity response
18
+ end
19
+ end
20
+
13
21
  def destroy(id, contract_id:)
14
22
  http.delete(
15
23
  "/contracts/#{contract_id}#{resource_base_path}/#{id}"
@@ -17,6 +17,15 @@ module Billimatic
17
17
  end
18
18
  end
19
19
 
20
+ def change_plan(token:, new_plan_id:)
21
+ http.patch(
22
+ "#{resource_base_path}/#{token}/change_plan",
23
+ body: { subscription: { new_plan_id: new_plan_id } }
24
+ ) do |response|
25
+ respond_with_entity response
26
+ end
27
+ end
28
+
20
29
  def cancel(token:)
21
30
  http.patch("#{resource_base_path}/#{token}/cancel") do |response|
22
31
  respond_with_entity response
@@ -1,3 +1,3 @@
1
1
  module Billimatic
2
- VERSION = '0.7.0'
2
+ VERSION = '0.8.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.7.0
4
+ version: 0.8.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-10-24 00:00:00.000000000 Z
13
+ date: 2016-10-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus