billimatic-client 0.12.0 → 0.13.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 168d252d34643694e03dea88d76c8a68841e62bc
4
- data.tar.gz: 398705e6879bf24dfb846bea6e829f2d8bfbbfe5
3
+ metadata.gz: 60f909a97c2ae050bb780b3725b8d643956adfdb
4
+ data.tar.gz: dba5e598bd26d8d08037e2da8794286645a50500
5
5
  SHA512:
6
- metadata.gz: 162b1d829c04793c8d9455976fb3b912ad44012e493e7b272959b4a7fe4bac4a381c87691dde7c4033e093583c0132b86675377503a09f227e5e2de3e89c4533
7
- data.tar.gz: 3e7117637b3dfea136397b8bc726e5d286944411db229602238d13b1d424e94287a2e316eb241e61dbc27dac29e2eba6f8512188cd118139adf7402f7e8f176b
6
+ metadata.gz: 79746ce11fc916c1e7ef1a22ccab3e6caa3c022170b11fd67069f8a542556bc3949762d2d27eeff5733acc6949bcf02c079a1762b87eb607a3ff88a0f6040297
7
+ data.tar.gz: e36f6b227fd20dbe79b1b9f3c6907203788331b2162a7fa7603afdf7589f5f13b11af70c89013c22dc50349907513473b738d80e9f484e098d39e8e503336ce1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- billimatic-client (0.12.0)
4
+ billimatic-client (0.13.0)
5
5
  multi_json (~> 1.11)
6
6
  typhoeus (~> 0.8)
7
7
  virtus (~> 1.0.5)
@@ -119,4 +119,4 @@ DEPENDENCIES
119
119
  vcr (~> 3.0)
120
120
 
121
121
  BUNDLED WITH
122
- 1.14.6
122
+ 1.15.1
data/README.md CHANGED
@@ -258,7 +258,18 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
258
258
  <tr>
259
259
  <td><code>GET</code></td>
260
260
  <td>
261
- <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_search_get_0" target="_blank">
261
+ <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_index_get_0" target="_blank">
262
+ /api/v1/organizations/:organization_id/contracts
263
+ </a>
264
+ </td>
265
+ <td>
266
+ <code>client.contracts.list(organization_id: id)</code>
267
+ </td>
268
+ </tr>
269
+ <tr>
270
+ <td><code>GET</code></td>
271
+ <td>
272
+ <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_search_get_1" target="_blank">
262
273
  /api/v1/contracts/search?name=:name
263
274
  </a>
264
275
  </td>
@@ -269,7 +280,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
269
280
  <tr>
270
281
  <td><code>POST</code></td>
271
282
  <td>
272
- <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_create_post_1" target="_blank">
283
+ <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_create_post_2" target="_blank">
273
284
  /api/v1/contracts
274
285
  </a>
275
286
  </td>
@@ -280,7 +291,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
280
291
  <tr>
281
292
  <td><code>PATCH</code></td>
282
293
  <td>
283
- <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_update_patch_2" target="_blank">
294
+ <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_update_patch_3" target="_blank">
284
295
  /api/v1/contracts/:id
285
296
  </a>
286
297
  </td>
@@ -291,7 +302,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
291
302
  <tr>
292
303
  <td><code>DELETE</code></td>
293
304
  <td>
294
- <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_destroy_delete_3" target="_blank">
305
+ <a href="https://app.billimatic.com.br/docs/api#!/contracts/API_V1_Contracts_destroy_delete_4" target="_blank">
295
306
  /api/v1/contracts/:id
296
307
  </a>
297
308
  </td>
@@ -6,8 +6,8 @@ require 'billimatic/version'
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'billimatic-client'
8
8
  spec.version = Billimatic::VERSION
9
- spec.authors = ['Rodrigo Tassinari de Oliveira', 'Leandro Thimóteo', 'Victor Franco']
10
- spec.email = ['rodrigo@pittlandia.net', 'leandro.s.thimoteo@gmail.com', 'victor.alexandrefs@gmail.com']
9
+ spec.authors = ['Rodrigo Tassinari de Oliveira', 'Leandro Thimóteo', 'Victor Franco', 'Anderson Ferreira']
10
+ spec.email = ['rodrigo@pittlandia.net', 'leandro.s.thimoteo@gmail.com', 'victor.alexandrefs@gmail.com', 'andyferreira92@gmail.com']
11
11
 
12
12
  spec.summary = %q{This is the official Ruby client for the Billimatic API.}
13
13
  spec.description = %q{This is the official Ruby client for the Billimatic API. See http://www.billimatic.com.br for more information.}
@@ -8,6 +8,7 @@ module Billimatic
8
8
  attribute :payment_value, Decimal
9
9
  attribute :description, String
10
10
  attribute :state, String
11
+ attribute :cancelled_automatically, Boolean
11
12
  attribute :nfe_service, String
12
13
  attribute :nfe_verification, String
13
14
  attribute :nfe_issue_date, DateTime
@@ -49,6 +49,12 @@ module Billimatic
49
49
  end
50
50
  end
51
51
 
52
+ def list_by_organization(id)
53
+ http.get("/organizations/#{id}#{resource_base_path}") do |response|
54
+ respond_with_collection response
55
+ end
56
+ end
57
+
52
58
  def destroy(id)
53
59
  crud_request do
54
60
  http.delete("#{resource_base_path}/#{id}") do |response|
@@ -10,6 +10,10 @@ module Billimatic
10
10
  respond_with_collection response
11
11
  end
12
12
  end
13
+
14
+ def list(organization_id:)
15
+ list_by_organization(organization_id)
16
+ end
13
17
  end
14
18
  end
15
19
  end
@@ -2,9 +2,7 @@ module Billimatic
2
2
  module Resources
3
3
  class Plan < Base
4
4
  def list(organization_id:)
5
- http.get("/organizations/#{organization_id}#{resource_base_path}") do |response|
6
- respond_with_collection response
7
- end
5
+ list_by_organization(organization_id)
8
6
  end
9
7
 
10
8
  def create(params, organization_id:)
@@ -1,3 +1,3 @@
1
1
  module Billimatic
2
- VERSION = '0.12.0'
2
+ VERSION = '0.13.0'
3
3
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: billimatic-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.0
4
+ version: 0.13.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Tassinari de Oliveira
8
8
  - Leandro Thimóteo
9
9
  - Victor Franco
10
+ - Anderson Ferreira
10
11
  autorequire:
11
12
  bindir: exe
12
13
  cert_chain: []
13
- date: 2017-05-19 00:00:00.000000000 Z
14
+ date: 2017-06-14 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: typhoeus
@@ -200,6 +201,7 @@ email:
200
201
  - rodrigo@pittlandia.net
201
202
  - leandro.s.thimoteo@gmail.com
202
203
  - victor.alexandrefs@gmail.com
204
+ - andyferreira92@gmail.com
203
205
  executables: []
204
206
  extensions: []
205
207
  extra_rdoc_files: []