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 +8 -8
- data/Gemfile.lock +1 -1
- data/README.md +24 -2
- data/lib/billimatic/resources/invoice.rb +8 -0
- data/lib/billimatic/resources/subscription.rb +9 -0
- data/lib/billimatic/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NDdmMjNmYTFhYzJjYWQzZGFmYzhiMjg1MjEyM2JlMzYyYzgxNzZmZA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MDRjMWZkN2ZlNjIxMWE1ZGNmZTdmNzZlNDEwMmE2NzYwMDM3MzNjMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OWM1ODY1ZDIzYmQwZTg1MjlkMDBhOWVkYTI4ZjFiMmUyNTczNmQxYmJiMDdh
|
10
|
+
MTc5MzJmODNjOTg1NTQ5OTAwZjJmNmE5M2I4ZDEyNGYxOGU3YTQzY2IyYTY5
|
11
|
+
MDQ5OWY0MjkyODJhMzU5MDQ1YjcwNGY0YzA1NzU4MjU1YjIzZDA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTAwNzIzZDUwZTRjNGU5ZWIwYjMzZWIzYzhjMzhjYzlkNTJjYzlhYmI0MjM4
|
14
|
+
YmM5MjA1NjM5ZjdiYmJiMTJhYTJmMmRhODI2MjI1ZjM1MDJjYTdkOTBkZDhh
|
15
|
+
YjlhMTUxNThlYWFiODI5NzQxM2IzZGNmODA3M2RiM2I4ODk3NzM=
|
data/Gemfile.lock
CHANGED
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/
|
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/
|
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
|
data/lib/billimatic/version.rb
CHANGED
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.
|
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-
|
13
|
+
date: 2016-10-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|