billimatic-client 0.19.1 → 0.20.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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +99 -66
- data/lib/billimatic.rb +2 -0
- data/lib/billimatic/client.rb +4 -0
- data/lib/billimatic/entities/invoice_template.rb +35 -0
- data/lib/billimatic/resources/base.rb +6 -0
- data/lib/billimatic/resources/contract.rb +1 -3
- data/lib/billimatic/resources/invoice_template.rb +13 -0
- data/lib/billimatic/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: eeb919f0727204184e4470b793a2f185bd418cfd
|
|
4
|
+
data.tar.gz: a33efcea1f8542aad0ec01cd4ff58f535558f69f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 291ceec821a999ad05eceee5cf781d62a4657c20e549b86329f0673bfbde1bc8c931db92ffd3f07fb490a44254bf20cd9bb555ae79634e4549ed52b015ceee7b
|
|
7
|
+
data.tar.gz: 19418b773ef6e73930252e6765aea25c36dc1cf1376b7740ffe7c676175e37a5c694e102e98733e094d75842516f8f787fd3072ab1ce10c20ceb4c32443ad873
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## Next version
|
|
4
4
|
|
|
5
|
+
## v0.20.0
|
|
6
|
+
- Adds InvoiceTemplate entity.
|
|
7
|
+
- Adds InvoiceTemplate#list and InvoiceTemplate#show endpoints.
|
|
8
|
+
- Changes links on README for new API documentation.
|
|
9
|
+
- Allows `invoice_template_id` attribute and InvoiceTemplate attributes override to be sent on InvoiceRule#create.
|
|
10
|
+
|
|
5
11
|
## v0.19.1
|
|
6
12
|
- Adds `apply_negative_updates` attribute on InvoiceRule entity.
|
|
7
13
|
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
|
@@ -47,19 +47,20 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
47
47
|
|
|
48
48
|
##### Now you have acess to every API endpoint:
|
|
49
49
|
|
|
50
|
-
* [Organizations API](https://
|
|
51
|
-
* [Plans API](https://
|
|
52
|
-
* [Subscriptions API](https://
|
|
53
|
-
* [Contracts API](https://
|
|
54
|
-
* [Invoices API](https://
|
|
55
|
-
* [Invoice
|
|
56
|
-
* [
|
|
57
|
-
* [
|
|
58
|
-
* [
|
|
50
|
+
* [Organizations API](https://myfreecomm.github.io/billimatic-api-docs/#organizacoes) as `client.organizations`
|
|
51
|
+
* [Plans API](https://myfreecomm.github.io/billimatic-api-docs/#planos) as `client.plans`
|
|
52
|
+
* [Subscriptions API](https://myfreecomm.github.io/billimatic-api-docs/#assinaturas) as `client.subscriptions`
|
|
53
|
+
* [Contracts API](https://myfreecomm.github.io/billimatic-api-docs/#contratos) as `client.contracts`
|
|
54
|
+
* [Invoices API](https://myfreecomm.github.io/billimatic-api-docs/#faturamentos) as `client.invoices`
|
|
55
|
+
* [Invoice Templates API](https://myfreecomm.github.io/billimatic-api-docs/#modelos-de-faturamento) as `client.invoice_templates`
|
|
56
|
+
* [Invoice Rules API](https://myfreecomm.github.io/billimatic-api-docs/#regras-de-faturamento) as `client.invoice_rules`
|
|
57
|
+
* [Companies API](https://myfreecomm.github.io/billimatic-api-docs/#empresas) as `client.companies`
|
|
58
|
+
* [People API](https://myfreecomm.github.io/billimatic-api-docs/#pessoas) as `client.people`
|
|
59
|
+
* [Service Items API](https://myfreecomm.github.io/billimatic-api-docs/#servicos) as `client.service_items`
|
|
59
60
|
|
|
60
61
|
## Endpoints
|
|
61
62
|
|
|
62
|
-
#### [Organizations](https://
|
|
63
|
+
#### [Organizations](https://myfreecomm.github.io/billimatic-api-docs/#organizacoes)
|
|
63
64
|
|
|
64
65
|
<table>
|
|
65
66
|
<tr>
|
|
@@ -70,7 +71,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
70
71
|
<tr>
|
|
71
72
|
<td><code>GET</code></td>
|
|
72
73
|
<td>
|
|
73
|
-
<a href="https://
|
|
74
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#busca-organizacao" target="_blank">
|
|
74
75
|
/api/v1/organizations/search?cnpj=:cnpj
|
|
75
76
|
</a>
|
|
76
77
|
</td>
|
|
@@ -81,7 +82,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
81
82
|
<tr>
|
|
82
83
|
<td><code>POST</code></td>
|
|
83
84
|
<td>
|
|
84
|
-
<a href="https://
|
|
85
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-organizacao" target="_blank">
|
|
85
86
|
/api/v1/organizations
|
|
86
87
|
</a>
|
|
87
88
|
</td>
|
|
@@ -92,7 +93,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
92
93
|
<tr>
|
|
93
94
|
<td><code>PUT</code></td>
|
|
94
95
|
<td>
|
|
95
|
-
<a href="https://
|
|
96
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-organizacao" target="_blank">
|
|
96
97
|
/api/v1/organizations/:id
|
|
97
98
|
</a>
|
|
98
99
|
</td>
|
|
@@ -103,7 +104,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
103
104
|
<tr>
|
|
104
105
|
<td><code>DELETE</code></td>
|
|
105
106
|
<td>
|
|
106
|
-
<a href="https://
|
|
107
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-organizacao" target="_blank">
|
|
107
108
|
/api/v1/organizations/:id
|
|
108
109
|
</a>
|
|
109
110
|
</td>
|
|
@@ -113,7 +114,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
113
114
|
</tr>
|
|
114
115
|
</table>
|
|
115
116
|
|
|
116
|
-
#### [Plans](https://
|
|
117
|
+
#### [Plans](https://myfreecomm.github.io/billimatic-api-docs/#planos)
|
|
117
118
|
|
|
118
119
|
<table>
|
|
119
120
|
<tr>
|
|
@@ -124,7 +125,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
124
125
|
<tr>
|
|
125
126
|
<td><code>GET</code></td>
|
|
126
127
|
<td>
|
|
127
|
-
<a href="https://
|
|
128
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-plano-s" target="_blank">
|
|
128
129
|
/api/v1/organizations/:organization_id/plans
|
|
129
130
|
</a>
|
|
130
131
|
</td>
|
|
@@ -135,7 +136,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
135
136
|
<tr>
|
|
136
137
|
<td><code>POST</code></td>
|
|
137
138
|
<td>
|
|
138
|
-
<a href="https://
|
|
139
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-plano" target="_blank">
|
|
139
140
|
/api/v1/organizations/:organization_id/plans
|
|
140
141
|
</a>
|
|
141
142
|
</td>
|
|
@@ -146,7 +147,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
146
147
|
<tr>
|
|
147
148
|
<td><code>PUT</code></td>
|
|
148
149
|
<td>
|
|
149
|
-
<a href="https://
|
|
150
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-plano" target="_blank">
|
|
150
151
|
/api/v1/organizations/:organization_id/plans/:id
|
|
151
152
|
</a>
|
|
152
153
|
</td>
|
|
@@ -157,7 +158,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
157
158
|
<tr>
|
|
158
159
|
<td><code>DELETE</code></td>
|
|
159
160
|
<td>
|
|
160
|
-
<a href="https://
|
|
161
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-plano" target="_blank">
|
|
161
162
|
/api/v1/organizations/:organization_id/plans/:id
|
|
162
163
|
</a>
|
|
163
164
|
</td>
|
|
@@ -167,7 +168,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
167
168
|
</tr>
|
|
168
169
|
</table>
|
|
169
170
|
|
|
170
|
-
#### [Subscriptions](https://
|
|
171
|
+
#### [Subscriptions](https://myfreecomm.github.io/billimatic-api-docs/#assinaturas)
|
|
171
172
|
|
|
172
173
|
<table>
|
|
173
174
|
<tr>
|
|
@@ -178,7 +179,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
178
179
|
<tr>
|
|
179
180
|
<td><code>GET</code></td>
|
|
180
181
|
<td>
|
|
181
|
-
<a href="https://
|
|
182
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-de-assinaturas" target="_blank">
|
|
182
183
|
/api/v1/subscriptions/token/:token
|
|
183
184
|
</a>
|
|
184
185
|
</td>
|
|
@@ -189,7 +190,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
189
190
|
<tr>
|
|
190
191
|
<td><code>POST</code></td>
|
|
191
192
|
<td>
|
|
192
|
-
<a href="https://
|
|
193
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-assinatura" target="_blank">
|
|
193
194
|
/api/v1/subscriptions
|
|
194
195
|
</a>
|
|
195
196
|
</td>
|
|
@@ -200,7 +201,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
200
201
|
<tr>
|
|
201
202
|
<td><code>POST</code></td>
|
|
202
203
|
<td>
|
|
203
|
-
<a href="https://
|
|
204
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#checkout-de-assinatura" target="_blank">
|
|
204
205
|
/api/v1/subscriptions/checkout/:token
|
|
205
206
|
</a>
|
|
206
207
|
</td>
|
|
@@ -211,7 +212,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
211
212
|
<tr>
|
|
212
213
|
<td><code>PATCH</code></td>
|
|
213
214
|
<td>
|
|
214
|
-
<a href="https://
|
|
215
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#trocas-de-plano-de-assinaturas" target="_blank">
|
|
215
216
|
/api/v1/subscriptions/:token/change_plan
|
|
216
217
|
</a>
|
|
217
218
|
</td>
|
|
@@ -222,7 +223,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
222
223
|
<tr>
|
|
223
224
|
<td><code>PATCH</code></td>
|
|
224
225
|
<td>
|
|
225
|
-
<a href="https://
|
|
226
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#trocas-de-forma-de-pagamento-em-assinaturas" target="_blank">
|
|
226
227
|
/api/v1/subscriptions/:token/update_payment_information
|
|
227
228
|
</a>
|
|
228
229
|
</td>
|
|
@@ -233,7 +234,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
233
234
|
<tr>
|
|
234
235
|
<td><code>PATCH</code></td>
|
|
235
236
|
<td>
|
|
236
|
-
<a href="https://
|
|
237
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cancelamento-de-assinatura" target="_blank">
|
|
237
238
|
/api/v1/subscriptions/:token/cancel
|
|
238
239
|
</a>
|
|
239
240
|
</td>
|
|
@@ -247,7 +248,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
247
248
|
</tr>
|
|
248
249
|
</table>
|
|
249
250
|
|
|
250
|
-
#### [Contracts](https://
|
|
251
|
+
#### [Contracts](https://myfreecomm.github.io/billimatic-api-docs/#contratos)
|
|
251
252
|
|
|
252
253
|
<table>
|
|
253
254
|
<tr>
|
|
@@ -258,7 +259,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
258
259
|
<tr>
|
|
259
260
|
<td><code>GET</code></td>
|
|
260
261
|
<td>
|
|
261
|
-
<a href="https://
|
|
262
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-contrato-s" target="_blank">
|
|
262
263
|
/api/v1/organizations/:organization_id/contracts
|
|
263
264
|
</a>
|
|
264
265
|
</td>
|
|
@@ -269,7 +270,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
269
270
|
<tr>
|
|
270
271
|
<td><code>GET</code></td>
|
|
271
272
|
<td>
|
|
272
|
-
<a href="https://
|
|
273
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-contrato" target="_blank">
|
|
273
274
|
/api/v1/organizations/:organization_id/contracts/:id
|
|
274
275
|
</a>
|
|
275
276
|
</td>
|
|
@@ -280,7 +281,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
280
281
|
<tr>
|
|
281
282
|
<td><code>GET</code></td>
|
|
282
283
|
<td>
|
|
283
|
-
<a href="https://
|
|
284
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#busca-contrato" target="_blank">
|
|
284
285
|
/api/v1/contracts/search?name=:name
|
|
285
286
|
</a>
|
|
286
287
|
</td>
|
|
@@ -291,7 +292,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
291
292
|
<tr>
|
|
292
293
|
<td><code>POST</code></td>
|
|
293
294
|
<td>
|
|
294
|
-
<a href="https://
|
|
295
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-contrato" target="_blank">
|
|
295
296
|
/api/v1/contracts
|
|
296
297
|
</a>
|
|
297
298
|
</td>
|
|
@@ -302,7 +303,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
302
303
|
<tr>
|
|
303
304
|
<td><code>PUT</code></td>
|
|
304
305
|
<td>
|
|
305
|
-
<a href="https://
|
|
306
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualizar-contrato" target="_blank">
|
|
306
307
|
/api/v1/contracts/:id
|
|
307
308
|
</a>
|
|
308
309
|
</td>
|
|
@@ -313,7 +314,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
313
314
|
<tr>
|
|
314
315
|
<td><code>DELETE</code></td>
|
|
315
316
|
<td>
|
|
316
|
-
<a href="https://
|
|
317
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-contrato" target="_blank">
|
|
317
318
|
/api/v1/contracts/:id
|
|
318
319
|
</a>
|
|
319
320
|
</td>
|
|
@@ -323,7 +324,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
323
324
|
</tr>
|
|
324
325
|
</table>
|
|
325
326
|
|
|
326
|
-
#### [Invoices](https://
|
|
327
|
+
#### [Invoices](https://myfreecomm.github.io/billimatic-api-docs/#faturamentos)
|
|
327
328
|
|
|
328
329
|
<table>
|
|
329
330
|
<tr>
|
|
@@ -334,7 +335,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
334
335
|
<tr>
|
|
335
336
|
<td><code>GET</code></td>
|
|
336
337
|
<td>
|
|
337
|
-
<a href="https://
|
|
338
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#buscar-faturamento" target="_blank">
|
|
338
339
|
/api/v1/contracts/:contract_id/invoices/search?issue_date_from=:issue_date_from&issue_date_to=:issue_date_to
|
|
339
340
|
</a>
|
|
340
341
|
</td>
|
|
@@ -345,7 +346,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
345
346
|
<tr>
|
|
346
347
|
<td><code>GET</code></td>
|
|
347
348
|
<td>
|
|
348
|
-
<a href="https://
|
|
349
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#faturamentos-inadimplentes" target="_blank">
|
|
349
350
|
/api/v1/contracts/:contract_id/invoices/late
|
|
350
351
|
</a>
|
|
351
352
|
</td>
|
|
@@ -356,7 +357,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
356
357
|
<tr>
|
|
357
358
|
<td><code>PATCH</code></td>
|
|
358
359
|
<td>
|
|
359
|
-
<a href="https://
|
|
360
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#bloqueia-faturamento" target="_blank">
|
|
360
361
|
/api/v1/contracts/:contract_id/invoices/:id/block
|
|
361
362
|
</a>
|
|
362
363
|
</td>
|
|
@@ -367,7 +368,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
367
368
|
<tr>
|
|
368
369
|
<td><code>PATCH</code></td>
|
|
369
370
|
<td>
|
|
370
|
-
<a href="https://
|
|
371
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#aprova-faturamento" target="_blank">
|
|
371
372
|
/api/v1/contracts/:contract_id/invoices/:id/approve
|
|
372
373
|
</a>
|
|
373
374
|
</td>
|
|
@@ -378,7 +379,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
378
379
|
<tr>
|
|
379
380
|
<td><code>POST</code></td>
|
|
380
381
|
<td>
|
|
381
|
-
<a href="https://
|
|
382
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-faturamento" target="_blank">
|
|
382
383
|
/api/v1/contracts/:contract_id/invoices
|
|
383
384
|
</a>
|
|
384
385
|
</td>
|
|
@@ -389,7 +390,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
389
390
|
<tr>
|
|
390
391
|
<td><code>GET</code></td>
|
|
391
392
|
<td>
|
|
392
|
-
<a href="https://
|
|
393
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-faturamento" target="_blank">
|
|
393
394
|
/api/v1/contracts/:contract_id/invoices/:id
|
|
394
395
|
</a>
|
|
395
396
|
</td>
|
|
@@ -400,7 +401,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
400
401
|
<tr>
|
|
401
402
|
<td><code>PUT</code></td>
|
|
402
403
|
<td>
|
|
403
|
-
<a href="https://
|
|
404
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-faturamento" target="_blank">
|
|
404
405
|
/api/v1/contracts/:contract_id/invoices/:id
|
|
405
406
|
</a>
|
|
406
407
|
</td>
|
|
@@ -411,7 +412,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
411
412
|
<tr>
|
|
412
413
|
<td><code>DELETE</code></td>
|
|
413
414
|
<td>
|
|
414
|
-
<a href="https://
|
|
415
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-faturamento" target="_blank">
|
|
415
416
|
/api/v1/contracts/:contract_id/invoices/:id
|
|
416
417
|
</a>
|
|
417
418
|
</td>
|
|
@@ -421,7 +422,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
421
422
|
</tr>
|
|
422
423
|
</table>
|
|
423
424
|
|
|
424
|
-
#### [Invoice
|
|
425
|
+
#### [Invoice Templates](https://myfreecomm.github.io/billimatic-api-docs/#modelos-de-faturamento)
|
|
425
426
|
|
|
426
427
|
<table>
|
|
427
428
|
<tr>
|
|
@@ -432,7 +433,39 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
432
433
|
<tr>
|
|
433
434
|
<td><code>GET</code></td>
|
|
434
435
|
<td>
|
|
435
|
-
<a href="https://
|
|
436
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-modelo-de-faturamento-s" target="_blank">
|
|
437
|
+
/api/v1/organizations/:organization_id/invoice_templates
|
|
438
|
+
</a>
|
|
439
|
+
</td>
|
|
440
|
+
<td>
|
|
441
|
+
<code>client.invoice_templates.list(organization_id: id)</code>
|
|
442
|
+
</td>
|
|
443
|
+
</tr>
|
|
444
|
+
<tr>
|
|
445
|
+
<td><code>GET</code></td>
|
|
446
|
+
<td>
|
|
447
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-modelo-de-faturamento" target="_blank">
|
|
448
|
+
/api/v1/organizations/:organization_id/invoice_templates/:id
|
|
449
|
+
</a>
|
|
450
|
+
</td>
|
|
451
|
+
<td>
|
|
452
|
+
<code>client.invoice_templates.show(id, organization_id: id)</code>
|
|
453
|
+
</td>
|
|
454
|
+
</tr>
|
|
455
|
+
</table>
|
|
456
|
+
|
|
457
|
+
#### [Invoice Rules](https://myfreecomm.github.io/billimatic-api-docs/#regras-de-faturamento)
|
|
458
|
+
|
|
459
|
+
<table>
|
|
460
|
+
<tr>
|
|
461
|
+
<th>HTTP method</th>
|
|
462
|
+
<th>Endpoint</th>
|
|
463
|
+
<th>Client method</th>
|
|
464
|
+
</tr>
|
|
465
|
+
<tr>
|
|
466
|
+
<td><code>GET</code></td>
|
|
467
|
+
<td>
|
|
468
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-regra-s-faturamento-s" target="_blank">
|
|
436
469
|
/api/v1/contracts/:contract_id/invoice_rules
|
|
437
470
|
</a>
|
|
438
471
|
</td>
|
|
@@ -443,7 +476,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
443
476
|
<tr>
|
|
444
477
|
<td><code>POST</code></td>
|
|
445
478
|
<td>
|
|
446
|
-
<a href="https://
|
|
479
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-regra-faturamento" target="_blank">
|
|
447
480
|
/api/v1/contracts/:contract_id/invoice_rules
|
|
448
481
|
</a>
|
|
449
482
|
</td>
|
|
@@ -454,7 +487,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
454
487
|
<tr>
|
|
455
488
|
<td><code>PUT</code></td>
|
|
456
489
|
<td>
|
|
457
|
-
<a href="https://
|
|
490
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-regra-faturamento" target="_blank">
|
|
458
491
|
/api/v1/contracts/:contract_id/invoice_rules/:id
|
|
459
492
|
</a>
|
|
460
493
|
</td>
|
|
@@ -465,7 +498,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
465
498
|
<tr>
|
|
466
499
|
<td><code>DELETE</code></td>
|
|
467
500
|
<td>
|
|
468
|
-
<a href="https://
|
|
501
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-regra-faturamento" target="_blank">
|
|
469
502
|
/api/v1/contracts/:contract_id/invoice_rules/:id
|
|
470
503
|
</a>
|
|
471
504
|
</td>
|
|
@@ -475,7 +508,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
475
508
|
</tr>
|
|
476
509
|
</table>
|
|
477
510
|
|
|
478
|
-
#### [Companies](https://
|
|
511
|
+
#### [Companies](https://myfreecomm.github.io/billimatic-api-docs/#empresas)
|
|
479
512
|
|
|
480
513
|
<table>
|
|
481
514
|
<tr>
|
|
@@ -486,7 +519,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
486
519
|
<tr>
|
|
487
520
|
<td><code>GET</code></td>
|
|
488
521
|
<td>
|
|
489
|
-
<a href="https://
|
|
522
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#busca-empresa" target="_blank">
|
|
490
523
|
/api/v1/companies/search?cnpj=:cnpj
|
|
491
524
|
</a>
|
|
492
525
|
</td>
|
|
@@ -497,7 +530,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
497
530
|
<tr>
|
|
498
531
|
<td><code>GET</code></td>
|
|
499
532
|
<td>
|
|
500
|
-
<a href="https://
|
|
533
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-empresa-s" target="_blank">
|
|
501
534
|
/api/v1/companies
|
|
502
535
|
</a>
|
|
503
536
|
</td>
|
|
@@ -508,7 +541,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
508
541
|
<tr>
|
|
509
542
|
<td><code>POST</code></td>
|
|
510
543
|
<td>
|
|
511
|
-
<a href="https://
|
|
544
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-empresa" target="_blank">
|
|
512
545
|
/api/v1/companies
|
|
513
546
|
</a>
|
|
514
547
|
</td>
|
|
@@ -519,7 +552,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
519
552
|
<tr>
|
|
520
553
|
<td><code>GET</code></td>
|
|
521
554
|
<td>
|
|
522
|
-
<a href="https://
|
|
555
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-empresa" target="_blank">
|
|
523
556
|
/api/v1/companies/:id
|
|
524
557
|
</a>
|
|
525
558
|
</td>
|
|
@@ -530,7 +563,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
530
563
|
<tr>
|
|
531
564
|
<td><code>PATCH</code></td>
|
|
532
565
|
<td>
|
|
533
|
-
<a href="https://
|
|
566
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-empresa" target="_blank">
|
|
534
567
|
/api/v1/companies/:id
|
|
535
568
|
</a>
|
|
536
569
|
</td>
|
|
@@ -541,7 +574,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
541
574
|
<tr>
|
|
542
575
|
<td><code>DELETE</code></td>
|
|
543
576
|
<td>
|
|
544
|
-
<a href="https://
|
|
577
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-empresa" target="_blank">
|
|
545
578
|
/api/v1/companies/:id
|
|
546
579
|
</a>
|
|
547
580
|
</td>
|
|
@@ -551,7 +584,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
551
584
|
</tr>
|
|
552
585
|
</table>
|
|
553
586
|
|
|
554
|
-
#### [People](https://
|
|
587
|
+
#### [People](https://myfreecomm.github.io/billimatic-api-docs/#pessoas)
|
|
555
588
|
|
|
556
589
|
<table>
|
|
557
590
|
<tr>
|
|
@@ -562,7 +595,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
562
595
|
<tr>
|
|
563
596
|
<td><code>GET</code></td>
|
|
564
597
|
<td>
|
|
565
|
-
<a href="https://
|
|
598
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#busca-pessoa" target="_blank">
|
|
566
599
|
/api/v1/people/search?cpf=:cpf
|
|
567
600
|
</a>
|
|
568
601
|
</td>
|
|
@@ -573,7 +606,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
573
606
|
<tr>
|
|
574
607
|
<td><code>GET</code></td>
|
|
575
608
|
<td>
|
|
576
|
-
<a href="https://
|
|
609
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#lista-pessoa-s" target="_blank">
|
|
577
610
|
/api/v1/people
|
|
578
611
|
</a>
|
|
579
612
|
</td>
|
|
@@ -584,7 +617,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
584
617
|
<tr>
|
|
585
618
|
<td><code>POST</code></td>
|
|
586
619
|
<td>
|
|
587
|
-
<a href="https://
|
|
620
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-pessoa" target="_blank">
|
|
588
621
|
/api/v1/people
|
|
589
622
|
</a>
|
|
590
623
|
</td>
|
|
@@ -595,7 +628,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
595
628
|
<tr>
|
|
596
629
|
<td><code>GET</code></td>
|
|
597
630
|
<td>
|
|
598
|
-
<a href="https://
|
|
631
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#detalhes-pessoa" target="_blank">
|
|
599
632
|
/api/v1/people/:id
|
|
600
633
|
</a>
|
|
601
634
|
</td>
|
|
@@ -606,7 +639,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
606
639
|
<tr>
|
|
607
640
|
<td><code>PUT</code></td>
|
|
608
641
|
<td>
|
|
609
|
-
<a href="https://
|
|
642
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-pessoa" target="_blank">
|
|
610
643
|
/api/v1/people/:id
|
|
611
644
|
</a>
|
|
612
645
|
</td>
|
|
@@ -617,7 +650,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
617
650
|
<tr>
|
|
618
651
|
<td><code>DELETE</code></td>
|
|
619
652
|
<td>
|
|
620
|
-
<a href="https://
|
|
653
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-pessoa" target="_blank">
|
|
621
654
|
/api/v1/people/:id
|
|
622
655
|
</a>
|
|
623
656
|
</td>
|
|
@@ -627,7 +660,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
627
660
|
</tr>
|
|
628
661
|
</table>
|
|
629
662
|
|
|
630
|
-
#### [Service Items](https://
|
|
663
|
+
#### [Service Items](https://myfreecomm.github.io/billimatic-api-docs/#servicos)
|
|
631
664
|
|
|
632
665
|
<table>
|
|
633
666
|
<tr>
|
|
@@ -638,7 +671,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
638
671
|
<tr>
|
|
639
672
|
<td><code>GET</code></td>
|
|
640
673
|
<td>
|
|
641
|
-
<a href="https://
|
|
674
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#busca-servico" target="_blank">
|
|
642
675
|
/api/v1/service_items/search?name=:name
|
|
643
676
|
</a>
|
|
644
677
|
</td>
|
|
@@ -649,7 +682,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
649
682
|
<tr>
|
|
650
683
|
<td><code>POST</code></td>
|
|
651
684
|
<td>
|
|
652
|
-
<a href="https://
|
|
685
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#cria-servico" target="_blank">
|
|
653
686
|
/api/v1/service_items
|
|
654
687
|
</a>
|
|
655
688
|
</td>
|
|
@@ -660,7 +693,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
660
693
|
<tr>
|
|
661
694
|
<td><code>PUT</code></td>
|
|
662
695
|
<td>
|
|
663
|
-
<a href="https://
|
|
696
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#atualiza-servico" target="_blank">
|
|
664
697
|
/api/v1/service_items/:id
|
|
665
698
|
</a>
|
|
666
699
|
</td>
|
|
@@ -671,7 +704,7 @@ client = Billimatic.client("YOUR_TOKEN_HERE")
|
|
|
671
704
|
<tr>
|
|
672
705
|
<td><code>DELETE</code></td>
|
|
673
706
|
<td>
|
|
674
|
-
<a href="https://
|
|
707
|
+
<a href="https://myfreecomm.github.io/billimatic-api-docs/#exclui-servico" target="_blank">
|
|
675
708
|
/api/v1/service_items/:id
|
|
676
709
|
</a>
|
|
677
710
|
</td>
|
data/lib/billimatic.rb
CHANGED
|
@@ -26,6 +26,7 @@ require 'billimatic/entities/organization'
|
|
|
26
26
|
require 'billimatic/entities/contract'
|
|
27
27
|
require 'billimatic/entities/invoice'
|
|
28
28
|
require 'billimatic/entities/invoice_rule'
|
|
29
|
+
require 'billimatic/entities/invoice_template'
|
|
29
30
|
require 'billimatic/entities/subscription'
|
|
30
31
|
require 'billimatic/entities/webhook'
|
|
31
32
|
|
|
@@ -35,6 +36,7 @@ require 'billimatic/resources/person'
|
|
|
35
36
|
require 'billimatic/resources/organization'
|
|
36
37
|
require 'billimatic/resources/contract'
|
|
37
38
|
require 'billimatic/resources/invoice_rule'
|
|
39
|
+
require 'billimatic/resources/invoice_template'
|
|
38
40
|
require 'billimatic/resources/invoice'
|
|
39
41
|
require 'billimatic/resources/plan'
|
|
40
42
|
require 'billimatic/resources/service_item'
|
data/lib/billimatic/client.rb
CHANGED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
module Billimatic
|
|
2
|
+
module Entities
|
|
3
|
+
class InvoiceTemplate < Base
|
|
4
|
+
attribute :id, Integer
|
|
5
|
+
attribute :name, String
|
|
6
|
+
attribute :services, [Service]
|
|
7
|
+
attribute :gross_value, Decimal
|
|
8
|
+
attribute :month_quantity, Integer
|
|
9
|
+
attribute :period_unit, String
|
|
10
|
+
attribute :management_type, String
|
|
11
|
+
attribute :automatic_email_template_id, Integer
|
|
12
|
+
attribute :notification_ruler_id, Integer
|
|
13
|
+
attribute :accrual_month_quantity, String
|
|
14
|
+
attribute :description, String
|
|
15
|
+
attribute :receivables_additional_information, Hash
|
|
16
|
+
attribute :scheduled_updates, Array[Hash]
|
|
17
|
+
attribute :notify_customer, Boolean
|
|
18
|
+
attribute :apply_negative_updates, Boolean
|
|
19
|
+
attribute :emites_service_values_id, Integer
|
|
20
|
+
attribute :emites_service_value_name, String
|
|
21
|
+
attribute :days_until_automatic_nfe_emission, Integer
|
|
22
|
+
attribute :nfe_body, String
|
|
23
|
+
attribute :payment_method, String
|
|
24
|
+
attribute :cobrato_charge_config_id, Integer
|
|
25
|
+
attribute :cobrato_charge_config_name, String
|
|
26
|
+
attribute :cobrato_charge_template_id, Integer
|
|
27
|
+
attribute :cobrato_charge_template_name, String
|
|
28
|
+
attribute :finance_category, String
|
|
29
|
+
attribute :finance_revenue_center, String
|
|
30
|
+
attribute :myfinance_sale_account_id, Integer
|
|
31
|
+
attribute :myfinance_sale_account_name, String
|
|
32
|
+
attribute :created_at, DateTime
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
@@ -55,6 +55,12 @@ module Billimatic
|
|
|
55
55
|
end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
+
def show_by_organization(organization_id, entity_id)
|
|
59
|
+
http.get(
|
|
60
|
+
"/organizations/#{organization_id}#{resource_base_path}/#{entity_id}"
|
|
61
|
+
) { |response| respond_with_entity response }
|
|
62
|
+
end
|
|
63
|
+
|
|
58
64
|
def destroy(id)
|
|
59
65
|
crud_request do
|
|
60
66
|
http.delete("#{resource_base_path}/#{id}") do |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.20.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rodrigo Tassinari de Oliveira
|
|
@@ -12,7 +12,7 @@ authors:
|
|
|
12
12
|
autorequire:
|
|
13
13
|
bindir: exe
|
|
14
14
|
cert_chain: []
|
|
15
|
-
date: 2018-
|
|
15
|
+
date: 2018-12-21 00:00:00.000000000 Z
|
|
16
16
|
dependencies:
|
|
17
17
|
- !ruby/object:Gem::Dependency
|
|
18
18
|
name: typhoeus
|
|
@@ -234,6 +234,7 @@ files:
|
|
|
234
234
|
- lib/billimatic/entities/entity_service_item.rb
|
|
235
235
|
- lib/billimatic/entities/invoice.rb
|
|
236
236
|
- lib/billimatic/entities/invoice_rule.rb
|
|
237
|
+
- lib/billimatic/entities/invoice_template.rb
|
|
237
238
|
- lib/billimatic/entities/organization.rb
|
|
238
239
|
- lib/billimatic/entities/payment_information.rb
|
|
239
240
|
- lib/billimatic/entities/person.rb
|
|
@@ -254,6 +255,7 @@ files:
|
|
|
254
255
|
- lib/billimatic/resources/hooks.rb
|
|
255
256
|
- lib/billimatic/resources/invoice.rb
|
|
256
257
|
- lib/billimatic/resources/invoice_rule.rb
|
|
258
|
+
- lib/billimatic/resources/invoice_template.rb
|
|
257
259
|
- lib/billimatic/resources/organization.rb
|
|
258
260
|
- lib/billimatic/resources/person.rb
|
|
259
261
|
- lib/billimatic/resources/plan.rb
|