cobrato-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 +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/README.md +14 -0
- data/lib/cobrato.rb +2 -0
- data/lib/cobrato/client.rb +5 -1
- data/lib/cobrato/configuration.rb +1 -1
- data/lib/cobrato/entities/charge.rb +1 -0
- data/lib/cobrato/entities/charge_template.rb +18 -0
- data/lib/cobrato/resources/charge_template.rb +7 -0
- data/lib/cobrato/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: dcddd1ef773ad40e3075f5b0d6e9c1de25c1381a
|
4
|
+
data.tar.gz: 130106e99daba1d1beca18211a7300ea1fab8901
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: af33839a9fc303303c61fbdecca0e2e25d0b1da1ebb4dc8497a058fb2cde456e910a5f1aeb96d9983bed1b0902b0d93c3479666d05e12936a204cefd9f191d98
|
7
|
+
data.tar.gz: fb7570e8f677ede979b26798a69b0d79c8bc400b2aa7c28917e9c039048b846930859c7179b9e64d6c781314f075952a42c73827686c51995e2325bd2492b174
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -164,6 +164,17 @@ Now you have acess to every API endpoint:
|
|
164
164
|
| ----------- | ------------------------------------------------------------------------------------- | -------------------------- |
|
165
165
|
| GET | [api/v1/charging_types](http://docs.cobrato.com/#lista-de-todos-os-tipos-de-cobrança) | client.changing_types.list |
|
166
166
|
|
167
|
+
#### [Charge Template](http://docs.cobrato.com/#modelo-de-cobran-a)
|
168
|
+
|
169
|
+
| HTTP method | Endpoint | Client method |
|
170
|
+
| ----------- | ----------------------------------------------------------------------------------------- | ------------------------------- |
|
171
|
+
| POST | [api/v1/charge_templates](http://docs.cobrato.com/#cria-o-de-modelo-de-cobran-a) | client.charge_templates.create |
|
172
|
+
| GET | [api/v1/charge_templates](http://docs.cobrato.com/#lista-de-todos-os-modelos-de-cobran-a) | client.charge_templates.list |
|
173
|
+
| GET | [api/v1/charge_templates/:id](http://docs.cobrato.com/#informa-es-do-modelo-de-cobran-a) | client.charge_templates.show |
|
174
|
+
| PUT | [api/v1/charge_templates/:id](http://docs.cobrato.com/#atualiza-o-de-modelo-de-cobran-a) | client.charge_templates.update |
|
175
|
+
| DELETE | [api/v1/charge_templates/:id](http://docs.cobrato.com/#exclus-o-de-modelo-de-cobran-a) | client.charge_templates.destroy |
|
176
|
+
|
177
|
+
|
167
178
|
## Payload signature check
|
168
179
|
|
169
180
|
You can check the [Cobrato signature](http://docs.cobrato.com/#assinatura-do-payload) on the payload request:
|
@@ -227,6 +238,9 @@ When you call `client.payees.destroy(1)`, an event `cobrato.payees.destroy` will
|
|
227
238
|
* webhooks
|
228
239
|
- cobrato.webhooks.create
|
229
240
|
- cobrato.webhooks.destroy
|
241
|
+
* charge_templates
|
242
|
+
- cobrato.charge_templates.create
|
243
|
+
- cobrato.charge_templates.destroy
|
230
244
|
|
231
245
|
## Contributing
|
232
246
|
|
data/lib/cobrato.rb
CHANGED
@@ -19,6 +19,7 @@ require "cobrato/entities/bank_billet"
|
|
19
19
|
require "cobrato/entities/regress_cnab"
|
20
20
|
require "cobrato/entities/remittance_cnab"
|
21
21
|
require "cobrato/entities/credit_card"
|
22
|
+
require "cobrato/entities/charge_template"
|
22
23
|
|
23
24
|
require "cobrato/resources/base"
|
24
25
|
require "cobrato/resources/payee"
|
@@ -31,6 +32,7 @@ require "cobrato/resources/charging_type"
|
|
31
32
|
require "cobrato/resources/regress_cnab"
|
32
33
|
require "cobrato/resources/remittance_cnab"
|
33
34
|
require "cobrato/resources/credit_card"
|
35
|
+
require "cobrato/resources/charge_template"
|
34
36
|
|
35
37
|
module Cobrato
|
36
38
|
def self.configuration
|
data/lib/cobrato/client.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
module Cobrato
|
2
|
+
module Entities
|
3
|
+
class ChargeTemplate < Base
|
4
|
+
attribute :id, Integer
|
5
|
+
attribute :name, String
|
6
|
+
attribute :charged_amount, Decimal
|
7
|
+
attribute :document_kind, String
|
8
|
+
attribute :charge_config_id, Integer
|
9
|
+
attribute :instructions, String
|
10
|
+
attribute :demonstrative, String
|
11
|
+
attribute :registrable, Boolean
|
12
|
+
attribute :auto_send_billet, Boolean
|
13
|
+
attribute :interest_amount_per_month, Decimal
|
14
|
+
attribute :mulct_type, String
|
15
|
+
attribute :mulct_value, Decimal
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/lib/cobrato/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cobrato-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.13.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcio Ricardo Santos
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: exe
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-11-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -199,6 +199,7 @@ files:
|
|
199
199
|
- lib/cobrato/entities/base.rb
|
200
200
|
- lib/cobrato/entities/charge.rb
|
201
201
|
- lib/cobrato/entities/charge_config.rb
|
202
|
+
- lib/cobrato/entities/charge_template.rb
|
202
203
|
- lib/cobrato/entities/credit_card.rb
|
203
204
|
- lib/cobrato/entities/payee.rb
|
204
205
|
- lib/cobrato/entities/payer.rb
|
@@ -212,6 +213,7 @@ files:
|
|
212
213
|
- lib/cobrato/resources/base.rb
|
213
214
|
- lib/cobrato/resources/charge.rb
|
214
215
|
- lib/cobrato/resources/charge_config.rb
|
216
|
+
- lib/cobrato/resources/charge_template.rb
|
215
217
|
- lib/cobrato/resources/charging_type.rb
|
216
218
|
- lib/cobrato/resources/credit_card.rb
|
217
219
|
- lib/cobrato/resources/hooks.rb
|