billimatic-client 0.11.3 → 0.12.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: bb388f2a18e689fcb08b69d9d375f4d1c44200a6
4
- data.tar.gz: 356dabd82324a59085fc17f0f84949a78ffe101d
3
+ metadata.gz: 168d252d34643694e03dea88d76c8a68841e62bc
4
+ data.tar.gz: 398705e6879bf24dfb846bea6e829f2d8bfbbfe5
5
5
  SHA512:
6
- metadata.gz: 11944728ad93c46bc379949ed9f20a0b5c6ed3e43c689c4168cf3f6d4f03f18010824c605011cda3116ef18046a1d451a2989ed127fbc2e408a8a91017a2abc1
7
- data.tar.gz: d2961cd2a4e9a5555efd79baa57efe284f31cbf7327efa2c5e6e9868026a99863b69a826b8e3c34fe742b36bb8d068699dcd0c994c4f6a8fce61b9ec024a6497
6
+ metadata.gz: 162b1d829c04793c8d9455976fb3b912ad44012e493e7b272959b4a7fe4bac4a381c87691dde7c4033e093583c0132b86675377503a09f227e5e2de3e89c4533
7
+ data.tar.gz: 3e7117637b3dfea136397b8bc726e5d286944411db229602238d13b1d424e94287a2e316eb241e61dbc27dac29e2eba6f8512188cd118139adf7402f7e8f176b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billimatic-client (0.11.3)
4
+ billimatic-client (0.12.0)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8)
7
7
  virtus (~> 1.0.5)
data/README.md CHANGED
@@ -321,20 +321,31 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
321
321
  </td>
322
322
  </tr>
323
323
  <tr>
324
- <td><code>GET</code></td>
324
+ <td><code>PATCH</code></td>
325
325
  <td>
326
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_show_get_2" target="_blank">
327
- /api/v1/contracts/:contract_id/invoices/:id
326
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_block_patch_1" target="_blank">
327
+ /api/v1/contracts/:contract_id/invoices/:id/block
328
328
  </a>
329
329
  </td>
330
330
  <td>
331
- <code>client.invoices.show(id, contract_id: id)</code>
331
+ <code>client.invoices.block(id, contract_id: id)</code>
332
+ </td>
333
+ </tr>
334
+ <tr>
335
+ <td><code>PATCH</code></td>
336
+ <td>
337
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_approve_patch_2" target="_blank">
338
+ /api/v1/contracts/:contract_id/invoices/:id/approve
339
+ </a>
340
+ </td>
341
+ <td>
342
+ <code>client.invoices.approve(id, contract_id: id)</code>
332
343
  </td>
333
344
  </tr>
334
345
  <tr>
335
346
  <td><code>POST</code></td>
336
347
  <td>
337
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_create_post_1" target="_blank">
348
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_create_post_3" target="_blank">
338
349
  /api/v1/contracts/:contract_id/invoices
339
350
  </a>
340
351
  </td>
@@ -342,10 +353,21 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
342
353
  <code>client.invoices.create(attributes_hash, contract_id: id)</code>
343
354
  </td>
344
355
  </tr>
356
+ <tr>
357
+ <td><code>GET</code></td>
358
+ <td>
359
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_show_get_4" target="_blank">
360
+ /api/v1/contracts/:contract_id/invoices/:id
361
+ </a>
362
+ </td>
363
+ <td>
364
+ <code>client.invoices.show(id, contract_id: id)</code>
365
+ </td>
366
+ </tr>
345
367
  <tr>
346
368
  <td><code>PATCH</code></td>
347
369
  <td>
348
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_update_patch_3" target="_blank">
370
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_update_patch_5" target="_blank">
349
371
  /api/v1/contracts/:contract_id/invoices/:id
350
372
  </a>
351
373
  </td>
@@ -356,7 +378,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
356
378
  <tr>
357
379
  <td><code>DELETE</code></td>
358
380
  <td>
359
- <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_destroy_delete_4" target="_blank">
381
+ <a href="https://app.billimatic.com.br/docs/api#!/invoices/API_V1_Invoices_destroy_delete_6" target="_blank">
360
382
  /api/v1/contracts/:contract_id/invoices/:id
361
383
  </a>
362
384
  </td>
@@ -29,9 +29,13 @@ module Billimatic
29
29
  attribute :cobrato_charge_template_id, Integer
30
30
  attribute :cobrato_charge_template_name, String
31
31
  attribute :management_type, String
32
+ attribute :days_until_automatic_nfe_emission, Integer
33
+ attribute :automatic_nfe_issue_date, Date
34
+ attribute :automatic_email_template_id, Integer
32
35
  attribute :receivables, [Receivable]
33
36
  attribute :services, [Service]
34
37
  attribute :attachments, [Hash]
38
+ attribute :approval_status, String
35
39
  end
36
40
  end
37
41
  end
@@ -17,6 +17,9 @@ module Billimatic
17
17
  attribute :cobrato_charge_template_id, Integer
18
18
  attribute :cobrato_charge_template_name, String
19
19
  attribute :management_type, String
20
+ attribute :days_until_automatic_nfe_emission, Integer
21
+ attribute :automatic_nfe_issue_date, Date
22
+ attribute :automatic_email_template_id, Integer
20
23
  attribute :services, Array[Service]
21
24
  attribute :additional_information, Hash
22
25
  attribute :scheduled_update, Hash
@@ -6,6 +6,7 @@ module Billimatic
6
6
  attribute :cobrato_card_id, Integer
7
7
  attribute :card_expiration_month, Integer
8
8
  attribute :card_expiration_year, Integer
9
+ attribute :installments, Integer
9
10
  attribute :created_at, DateTime
10
11
  end
11
12
  end
@@ -29,6 +29,8 @@ module Billimatic
29
29
  attribute :finance_revenue_center, String
30
30
  attribute :created_at, DateTime
31
31
  attribute :products, Array[Product]
32
+ attribute :allow_installments, Boolean
33
+ attribute :installments_limit, Integer
32
34
  end
33
35
  end
34
36
  end
@@ -25,6 +25,22 @@ module Billimatic
25
25
  response.code == 204
26
26
  end
27
27
  end
28
+
29
+ def block(id, contract_id:)
30
+ http.patch(
31
+ "/contracts/#{contract_id}/invoices/#{id}/block"
32
+ ) do |response|
33
+ respond_with_entity response
34
+ end
35
+ end
36
+
37
+ def approve(id, contract_id:)
38
+ http.patch(
39
+ "/contracts/#{contract_id}/invoices/#{id}/approve"
40
+ ) do |response|
41
+ respond_with_entity response
42
+ end
43
+ end
28
44
  end
29
45
  end
30
46
  end
@@ -1,3 +1,3 @@
1
1
  module Billimatic
2
- VERSION = '0.11.3'
2
+ VERSION = '0.12.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.11.3
4
+ version: 0.12.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: 2017-04-11 00:00:00.000000000 Z
13
+ date: 2017-05-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: typhoeus