cobrato-client 0.2.11 → 0.3.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +55 -0
- data/Gemfile.lock +1 -1
- data/README.md +12 -12
- data/lib/cobrato.rb +2 -2
- data/lib/cobrato/client.rb +2 -2
- data/lib/cobrato/entities/charge.rb +5 -5
- data/lib/cobrato/entities/{charge_account.rb → charge_config.rb} +2 -1
- data/lib/cobrato/entities/regress_cnab.rb +4 -4
- data/lib/cobrato/entities/remittance_cnab.rb +3 -3
- data/lib/cobrato/resources/{charge_account.rb → charge_config.rb} +1 -1
- data/lib/cobrato/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 34e41e9ef0321c8cf312f03d315e020a9afc3567
|
4
|
+
data.tar.gz: cfcfe54f2026a64fdd3a720db55f189f348bfc88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62a05d8c70b7b526d41389c4d46fbc70188cccb5959960368608e85b8e9f416ea4b76a07d392bb48ec9296d30ea2bd503ce550f7a261578949e9401342debec2
|
7
|
+
data.tar.gz: 744e551420c4b37ca0741ede0a4045a7811209bbff54f1b2843efc8d8b826f9336b037499ad55b1940a65ea33617045ffb6999a8beb1da099581f6d7b2dcf3f7
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## v0.3.0
|
4
|
+
|
5
|
+
### Structural changes
|
6
|
+
|
7
|
+
To open the path for new charging methods beyond Bank Billet, we made some structural changes:
|
8
|
+
|
9
|
+
#### `ChargeAccount` is now `ChargeConfig`
|
10
|
+
|
11
|
+
`ChargeAccount` is now `ChargeConfig` and have new attributes:
|
12
|
+
|
13
|
+
- `type`: the only possible value at this moment is `"billet"` that is the default value
|
14
|
+
|
15
|
+
#### Changes on `Charge`
|
16
|
+
|
17
|
+
##### Changed `Charge` attribute names
|
18
|
+
|
19
|
+
- `Charge#status` now is `Charge#registration_status`
|
20
|
+
- `Charge#registered` now is `Charge#registrable`
|
21
|
+
- `Charge#charge_account_id` now is `Charge#charge_config_id`
|
22
|
+
|
23
|
+
##### Removed `Charge` attributes
|
24
|
+
|
25
|
+
- `Charge#has_cnab_remittance`
|
26
|
+
|
27
|
+
##### Added `Charge` attributes
|
28
|
+
|
29
|
+
- `type`: the only possible value at this moment is `"billet"`
|
30
|
+
|
31
|
+
##### Changed `Charge#registration_status` (old `Charge#status`) names
|
32
|
+
|
33
|
+
- `"not_generated_remittance"` is now `"without_remittance"`
|
34
|
+
- `"generated_remittance"` is now `"remitted"`
|
35
|
+
- `"registered"` stays the same
|
36
|
+
- `"registered_with_error"` was added
|
37
|
+
|
38
|
+
#### Changes on `RegressCnab`
|
39
|
+
|
40
|
+
##### Changed `RegressCnab` attribute names
|
41
|
+
|
42
|
+
- `RegressCnab#charge_account_id` now is `RegressCnab#charge_config_id`
|
43
|
+
|
44
|
+
#### Changes on `RemittanceCnab`
|
45
|
+
|
46
|
+
##### Changed `RemittanceCnab` attribute names
|
47
|
+
|
48
|
+
- `RemittanceCnab#charge_account_id` now is `RemittanceCnab#charge_config_id`
|
49
|
+
|
50
|
+
|
51
|
+
## v0.2.11
|
52
|
+
|
53
|
+
### Add `ChargeAccount` attributes:
|
54
|
+
|
55
|
+
- `transmission-code`: it is a remittance related attribute only used by billet ChargeConfig for Santander bank
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -49,7 +49,7 @@ end
|
|
49
49
|
|
50
50
|
* [Payees API](http://docs.cobrato.com/#beneficiário)
|
51
51
|
* [Bank Accounts API](http://docs.cobrato.com/#conta-bancária)
|
52
|
-
* [Charge
|
52
|
+
* [Charge Configs API](http://docs.cobrato.com/#configuração-de-cobrança)
|
53
53
|
* [Charges API](http://docs.cobrato.com/#cobrança)
|
54
54
|
* [Regress Cnab](http://docs.cobrato.com/#cnab-de-retorno)
|
55
55
|
* [Remittance Cnab](http://docs.cobrato.com/#cnab-de-remessa)
|
@@ -78,15 +78,15 @@ end
|
|
78
78
|
| DELETE | [api/v1/bank_accounts/:id](http://docs.cobrato.com/#exclusão-de-conta-bancária) | client.bank_accounts.destroy |
|
79
79
|
| GET | [api/v1/bank_accounts/portfolio_codes](http://docs.cobrato.com/#carteiras-disponíveis) | client.bank_accounts.portfolio_codes |
|
80
80
|
|
81
|
-
#### [Charge
|
81
|
+
#### [Charge Configs](http://docs.cobrato.com/#configuração-de-cobrança)
|
82
82
|
|
83
|
-
| HTTP method | Endpoint
|
84
|
-
| ----------- |
|
85
|
-
| POST | [api/v1/
|
86
|
-
| GET | [api/v1/
|
87
|
-
| GET | [api/v1/
|
88
|
-
| PUT | [api/v1/
|
89
|
-
| DELETE | [api/v1/
|
83
|
+
| HTTP method | Endpoint | Client method |
|
84
|
+
| ----------- | --------------------------------------------------------------------------------------------- | ------------------------------ |
|
85
|
+
| POST | [api/v1/charge_configs](http://docs.cobrato.com/#criação-de-configuração-de-cobrança) | client.charge_configs.create |
|
86
|
+
| GET | [api/v1/charge_configs](http://docs.cobrato.com/#lista-de-todas-as-configurações-de-cobrança) | client.charge_configs.list |
|
87
|
+
| GET | [api/v1/charge_configs/:id](http://docs.cobrato.com/#informações-de-configuração-de-cobrança) | client.charge_configs.show |
|
88
|
+
| PUT | [api/v1/charge_configs/:id](http://docs.cobrato.com/#atualização-de-configuração-de-cobrança) | client.charge_configs.update |
|
89
|
+
| DELETE | [api/v1/charge_configs/:id](http://docs.cobrato.com/#exclusão-de-configuração-de-cobrança) | client.charge_configs.destroy |
|
90
90
|
|
91
91
|
#### [Charges](http://docs.cobrato.com/#cobrança)
|
92
92
|
|
@@ -190,9 +190,9 @@ When you call `client.payees.destroy(1)`, an event `cobrato.payees.destroy` will
|
|
190
190
|
* bank_accounts
|
191
191
|
- cobrato.bank_accounts.create
|
192
192
|
- cobrato.bank_accounts.destroy
|
193
|
-
*
|
194
|
-
- cobrato.
|
195
|
-
- cobrato.
|
193
|
+
* charge_configs
|
194
|
+
- cobrato.charge_configs.create
|
195
|
+
- cobrato.charge_configs.destroy
|
196
196
|
* charges
|
197
197
|
- cobrato.charges.create
|
198
198
|
- cobrato.charges.destroy
|
data/lib/cobrato.rb
CHANGED
@@ -11,7 +11,7 @@ require "cobrato/signature"
|
|
11
11
|
require "cobrato/entities/base"
|
12
12
|
require "cobrato/entities/payee"
|
13
13
|
require "cobrato/entities/bank_account"
|
14
|
-
require "cobrato/entities/
|
14
|
+
require "cobrato/entities/charge_config"
|
15
15
|
require "cobrato/entities/charge"
|
16
16
|
require "cobrato/entities/webhook"
|
17
17
|
require "cobrato/entities/bank_billet"
|
@@ -21,7 +21,7 @@ require "cobrato/entities/remittance_cnab"
|
|
21
21
|
require "cobrato/resources/base"
|
22
22
|
require "cobrato/resources/payee"
|
23
23
|
require "cobrato/resources/bank_account"
|
24
|
-
require "cobrato/resources/
|
24
|
+
require "cobrato/resources/charge_config"
|
25
25
|
require "cobrato/resources/charge"
|
26
26
|
require "cobrato/resources/webhook"
|
27
27
|
require "cobrato/resources/charging_type"
|
data/lib/cobrato/client.rb
CHANGED
@@ -2,7 +2,8 @@ module Cobrato
|
|
2
2
|
module Entities
|
3
3
|
class Charge < Base
|
4
4
|
attribute :id, Integer
|
5
|
-
attribute :
|
5
|
+
attribute :type, String
|
6
|
+
attribute :charge_config_id, Integer
|
6
7
|
attribute :due_date, Date
|
7
8
|
attribute :processing_date, Date
|
8
9
|
attribute :document_kind, String
|
@@ -21,9 +22,8 @@ module Cobrato
|
|
21
22
|
attribute :received_at, Date
|
22
23
|
attribute :processing_date, Date
|
23
24
|
attribute :for_homologation, Boolean
|
24
|
-
attribute :
|
25
|
-
attribute :
|
26
|
-
attribute :status, String
|
25
|
+
attribute :registrable, Boolean
|
26
|
+
attribute :registration_status, String
|
27
27
|
attribute :payer_national_identifier_type, String
|
28
28
|
attribute :payer_national_identifier, String
|
29
29
|
attribute :payer_name, String
|
@@ -36,4 +36,4 @@ module Cobrato
|
|
36
36
|
attribute :payer_state, String
|
37
37
|
end
|
38
38
|
end
|
39
|
-
end
|
39
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Cobrato
|
2
2
|
module Entities
|
3
3
|
class RegressCnab < Base
|
4
|
-
attribute :id,
|
5
|
-
attribute :
|
6
|
-
attribute :status,
|
7
|
-
attribute :report,
|
4
|
+
attribute :id, Integer
|
5
|
+
attribute :charge_config_id, Integer
|
6
|
+
attribute :status, String
|
7
|
+
attribute :report, Hash
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -1,9 +1,9 @@
|
|
1
1
|
module Cobrato
|
2
2
|
module Entities
|
3
3
|
class RemittanceCnab < Base
|
4
|
-
attribute :id,
|
5
|
-
attribute :
|
6
|
-
attribute :status,
|
4
|
+
attribute :id, Integer
|
5
|
+
attribute :charge_config_id, Integer
|
6
|
+
attribute :status, String
|
7
7
|
end
|
8
8
|
end
|
9
9
|
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.3.0.rc1
|
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-04-
|
13
|
+
date: 2016-04-04 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -180,6 +180,7 @@ files:
|
|
180
180
|
- .hound.yml
|
181
181
|
- .rspec
|
182
182
|
- .travis.yml
|
183
|
+
- CHANGELOG.md
|
183
184
|
- Gemfile
|
184
185
|
- Gemfile.lock
|
185
186
|
- LICENSE
|
@@ -195,7 +196,7 @@ files:
|
|
195
196
|
- lib/cobrato/entities/bank_billet.rb
|
196
197
|
- lib/cobrato/entities/base.rb
|
197
198
|
- lib/cobrato/entities/charge.rb
|
198
|
-
- lib/cobrato/entities/
|
199
|
+
- lib/cobrato/entities/charge_config.rb
|
199
200
|
- lib/cobrato/entities/payee.rb
|
200
201
|
- lib/cobrato/entities/regress_cnab.rb
|
201
202
|
- lib/cobrato/entities/remittance_cnab.rb
|
@@ -206,7 +207,7 @@ files:
|
|
206
207
|
- lib/cobrato/resources/bank_account.rb
|
207
208
|
- lib/cobrato/resources/base.rb
|
208
209
|
- lib/cobrato/resources/charge.rb
|
209
|
-
- lib/cobrato/resources/
|
210
|
+
- lib/cobrato/resources/charge_config.rb
|
210
211
|
- lib/cobrato/resources/charging_type.rb
|
211
212
|
- lib/cobrato/resources/hooks.rb
|
212
213
|
- lib/cobrato/resources/payee.rb
|
@@ -231,9 +232,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
231
232
|
version: '0'
|
232
233
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
233
234
|
requirements:
|
234
|
-
- - '
|
235
|
+
- - '>'
|
235
236
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
237
|
+
version: 1.3.1
|
237
238
|
requirements: []
|
238
239
|
rubyforge_project:
|
239
240
|
rubygems_version: 2.0.14.1
|