cobrato-client 0.2.2 → 0.2.3.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +65 -64
- data/lib/cobrato/entities/bank_account.rb +1 -1
- data/lib/cobrato/entities/charge.rb +0 -7
- data/lib/cobrato/request.rb +1 -1
- data/lib/cobrato/resources/charge.rb +6 -0
- data/lib/cobrato/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 65252228b0a9bf02570475a31b6b5f4678f0af7e
|
4
|
+
data.tar.gz: e8aefd1aa1803bacd0342b9146b113e8e76a948e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c1c15f03045c045f3d692fe13684c97c7a0629304ec530497d3118c110e7abe1e44e17acf4f8bcfaf62017fd481123b191b3fac0bf5f55dd88ec000b2b48f1b
|
7
|
+
data.tar.gz: 4c00d5893424c79b7d8adc5eb6c211f4c9ef6721a8334f647a16c1a776ac856a9ab317730390fbf2551a76c4716847467289e37b97b97b8f84b5e555a392ad70
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -47,73 +47,74 @@ end
|
|
47
47
|
|
48
48
|
##### Now you have acess to every API endpoint:
|
49
49
|
|
50
|
-
* [Payees API](http://
|
51
|
-
* [Bank Accounts API](http://
|
52
|
-
* [Charge Accounts API](http://
|
53
|
-
* [Charges API](http://
|
54
|
-
* [Webhooks API](http://
|
50
|
+
* [Payees API](http://docs.cobrato.com/#beneficiário)
|
51
|
+
* [Bank Accounts API](http://docs.cobrato.com/#conta-bancária)
|
52
|
+
* [Charge Accounts API](http://docs.cobrato.com/#conta-de-cobrança)
|
53
|
+
* [Charges API](http://docs.cobrato.com/#cobrança)
|
54
|
+
* [Webhooks API](http://docs.cobrato.com/#webhook)
|
55
55
|
|
56
56
|
## Endpoints
|
57
57
|
|
58
|
-
#### [Payees](http://
|
59
|
-
|
60
|
-
| HTTP method | Endpoint
|
61
|
-
| ----------- |
|
62
|
-
| POST | [api/v1/payees](http://
|
63
|
-
| GET | [api/v1/payees](http://
|
64
|
-
| GET | [api/v1/payees/:id](http://
|
65
|
-
| PUT | [api/v1/payees/:id](http://
|
66
|
-
| DELETE | [api/v1/payees/:id](http://
|
67
|
-
|
68
|
-
#### [Bank Accounts](http://
|
69
|
-
|
70
|
-
| HTTP method | Endpoint
|
71
|
-
| ----------- |
|
72
|
-
| POST | [api/v1/bank_accounts](http://
|
73
|
-
| GET | [api/v1/bank_accounts](http://
|
74
|
-
| GET | [api/v1/bank_accounts/:id](http://
|
75
|
-
| PUT | [api/v1/bank_accounts/:id](http://
|
76
|
-
| DELETE | [api/v1/bank_accounts/:id](http://
|
77
|
-
| GET | [api/v1/bank_accounts/portfolio_codes](http://
|
78
|
-
|
79
|
-
#### [Charge Accounts](http://
|
80
|
-
|
81
|
-
| HTTP method | Endpoint
|
82
|
-
| ----------- |
|
83
|
-
| POST | [api/v1/charge_accounts](http://
|
84
|
-
| GET | [api/v1/charge_accounts](http://
|
85
|
-
| GET | [api/v1/charge_accounts/:id](http://
|
86
|
-
| PUT | [api/v1/charge_accounts/:id](http://
|
87
|
-
| DELETE | [api/v1/charge_accounts/:id](http://
|
88
|
-
|
89
|
-
#### [Charges](http://
|
90
|
-
|
91
|
-
| HTTP method | Endpoint
|
92
|
-
| ----------- |
|
93
|
-
| POST | [api/v1/charges](http://
|
94
|
-
| GET | [api/v1/charges](http://
|
95
|
-
| GET | [api/v1/charges/:id](http://
|
96
|
-
| PUT | [api/v1/charges/:id](http://
|
97
|
-
| DELETE | [api/v1/charges/:id](http://
|
98
|
-
| POST | [api/v1/charges/:id/receive](http://
|
99
|
-
| POST | [api/v1/charges/:id/undo_receive](http://
|
100
|
-
| POST | [api/v1/charges/:id/deliver_billet](http://
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
| GET | [api/v1/webhooks
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
|
116
|
-
|
|
58
|
+
#### [Payees](http://docs.cobrato.com/#beneficiário)
|
59
|
+
|
60
|
+
| HTTP method | Endpoint | Client method |
|
61
|
+
| ----------- | ------------------------------------------------------------------------- | --------------------- |
|
62
|
+
| POST | [api/v1/payees](http://docs.cobrato.com/#criação-de-beneficiário) | client.payees.create |
|
63
|
+
| GET | [api/v1/payees](http://docs.cobrato.com/#lista-de-todos-os-beneficiários) | client.payees.list |
|
64
|
+
| GET | [api/v1/payees/:id](http://docs.cobrato.com/#informações-do-beneficiário) | client.payees.show |
|
65
|
+
| PUT | [api/v1/payees/:id](http://docs.cobrato.com/#atualização-de-beneficiário) | client.payees.update |
|
66
|
+
| DELETE | [api/v1/payees/:id](http://docs.cobrato.com/#exclusão-de-beneficiário) | client.payees.destroy |
|
67
|
+
|
68
|
+
#### [Bank Accounts](http://docs.cobrato.com/#conta-bancária)
|
69
|
+
|
70
|
+
| HTTP method | Endpoint | Client method |
|
71
|
+
| ----------- | -------------------------------------------------------------------------------------- | ------------------------------------ |
|
72
|
+
| POST | [api/v1/bank_accounts](http://docs.cobrato.com/#criação-de-conta-bancária) | client.bank_accounts.create |
|
73
|
+
| GET | [api/v1/bank_accounts](http://docs.cobrato.com/#lista-de-todas-as-contas-bancárias) | client.bank_accounts.list |
|
74
|
+
| GET | [api/v1/bank_accounts/:id](http://docs.cobrato.com/#informações-da-conta-bancária) | client.bank_accounts.show |
|
75
|
+
| PUT | [api/v1/bank_accounts/:id](http://docs.cobrato.com/#atualização-de-conta-bancária) | client.bank_accounts.update |
|
76
|
+
| DELETE | [api/v1/bank_accounts/:id](http://docs.cobrato.com/#exclusão-de-conta-bancária) | client.bank_accounts.destroy |
|
77
|
+
| GET | [api/v1/bank_accounts/portfolio_codes](http://docs.cobrato.com/#carteiras-disponíveis) | client.bank_accounts.portfolio_codes |
|
78
|
+
|
79
|
+
#### [Charge Accounts](http://docs.cobrato.com/#conta-de-cobrança)
|
80
|
+
|
81
|
+
| HTTP method | Endpoint | Client method |
|
82
|
+
| ----------- | --------------------------------------------------------------------------------------- | ------------------------------ |
|
83
|
+
| POST | [api/v1/charge_accounts](http://docs.cobrato.com/#criação-de-conta-de-cobrança) | client.charge_accounts.create |
|
84
|
+
| GET | [api/v1/charge_accounts](http://docs.cobrato.com/#lista-de-todas-as-contas-de-cobrança) | client.charge_accounts.list |
|
85
|
+
| GET | [api/v1/charge_accounts/:id](http://docs.cobrato.com/#informações-da-conta-de-cobrança) | client.charge_accounts.show |
|
86
|
+
| PUT | [api/v1/charge_accounts/:id](http://docs.cobrato.com/#atualização-de-conta-de-cobrança) | client.charge_accounts.update |
|
87
|
+
| DELETE | [api/v1/charge_accounts/:id](http://docs.cobrato.com/#exclusão-de-conta-de-cobrança) | client.charge_accounts.destroy |
|
88
|
+
|
89
|
+
#### [Charges](http://docs.cobrato.com/#cobrança)
|
90
|
+
|
91
|
+
| HTTP method | Endpoint | Client method |
|
92
|
+
| ----------- | -------------------------------------------------------------------------------------------- | ----------------------------- |
|
93
|
+
| POST | [api/v1/charges](http://docs.cobrato.com/#criação-de-cobrança) | client.charges.create |
|
94
|
+
| GET | [api/v1/charges](http://docs.cobrato.com/#lista-de-todas-as-cobrança) | client.charges.list |
|
95
|
+
| GET | [api/v1/charges/:id](http://docs.cobrato.com/#informações-da-cobrança) | client.charges.show |
|
96
|
+
| PUT | [api/v1/charges/:id](http://docs.cobrato.com/#atualização-de-cobrança) | client.charges.update |
|
97
|
+
| DELETE | [api/v1/charges/:id](http://docs.cobrato.com/#exclusão-de-cobrança) | client.charges.destroy |
|
98
|
+
| POST | [api/v1/charges/:id/receive](http://docs.cobrato.com/#recebimento-de-cobrança) | client.charges.receive |
|
99
|
+
| POST | [api/v1/charges/:id/undo_receive](http://docs.cobrato.com/#desfazer-recebimento-de-cobrança) | client.charges.undo_receive |
|
100
|
+
| POST | [api/v1/charges/:id/deliver_billet](http://docs.cobrato.com/#envio-de-boleto-da-cobrança) | client.charges.deliver_billet |
|
101
|
+
| GET | [api/v1/charges/:id/billet](http://docs.cobrato.com/#boleto-da-cobrança) | client.charges.billet |
|
102
|
+
|
103
|
+
#### [Webhooks](http://docs.cobrato.com/#webhook)
|
104
|
+
|
105
|
+
| HTTP method | Endpoint | Client method |
|
106
|
+
| ----------- | ---------------------------------------------------------------------- | ----------------------- |
|
107
|
+
| POST | [api/v1/webhooks](http://docs.cobrato.com/#criação-de-webhook) | client.webhooks.create |
|
108
|
+
| GET | [api/v1/webhooks](http://docs.cobrato.com/#lista-de-todos-os-webhooks) | client.webhooks.list |
|
109
|
+
| GET | [api/v1/webhooks/:id](http://docs.cobrato.com/#informações-do-webhook) | client.webhooks.show |
|
110
|
+
| PUT | [api/v1/webhooks/:id](http://docs.cobrato.com/#atualização-de-webhook) | client.webhooks.update |
|
111
|
+
| DELETE | [api/v1/webhooks/:id](http://docs.cobrato.com/#exclusão-de-webhook) | client.webhooks.destroy |
|
112
|
+
|
113
|
+
#### [Charging types](http://docs.cobrato.com/#tipos-de-cobrança)
|
114
|
+
|
115
|
+
| HTTP method | Endpoint | Client method |
|
116
|
+
| ----------- | ------------------------------------------------------------------------------------- | -------------------------- |
|
117
|
+
| GET | [api/v1/charging_types](http://docs.cobrato.com/#lista-de-todos-os-tipos-de-cobrança) | client.changing_types.list |
|
117
118
|
|
118
119
|
## Callbacks
|
119
120
|
|
@@ -23,13 +23,6 @@ module Cobrato
|
|
23
23
|
attribute :for_homologation, Boolean
|
24
24
|
attribute :payment_method, String
|
25
25
|
attribute :has_cnab_remittance, Boolean
|
26
|
-
attribute :billet_url, String
|
27
|
-
|
28
|
-
def initialize(attrs)
|
29
|
-
attrs = JSON.parse(attrs.to_json, symbolize_names: true)
|
30
|
-
attrs[:billet_url] = attrs[:_links].find { |l| l[:rel] == 'billet' }[:href]
|
31
|
-
super attrs
|
32
|
-
end
|
33
26
|
end
|
34
27
|
end
|
35
28
|
end
|
data/lib/cobrato/request.rb
CHANGED
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.2.
|
4
|
+
version: 0.2.3.pre
|
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: 2015-10-
|
13
|
+
date: 2015-10-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: typhoeus
|
@@ -226,9 +226,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
228
228
|
requirements:
|
229
|
-
- - "
|
229
|
+
- - ">"
|
230
230
|
- !ruby/object:Gem::Version
|
231
|
-
version:
|
231
|
+
version: 1.3.1
|
232
232
|
requirements: []
|
233
233
|
rubyforge_project:
|
234
234
|
rubygems_version: 2.4.5.1
|