boletosimples 0.1.1 → 0.2.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: 948e6f3aa087ac1903c87f91160c0f93e225dcea
4
- data.tar.gz: 935cd49f3e6963721f5b02822441ee5921a83f7d
3
+ metadata.gz: 1eb29ddb6b2c82e29764003b755c4c2c7f718cf1
4
+ data.tar.gz: d1514759d09ac255c99ee9388141d20db88fd151
5
5
  SHA512:
6
- metadata.gz: a512a53c11957d7d8392da1ee15bc86ebe1253bf85d3ff010fbf8f05a14aeda732eabd69fd087b052f57ae98a0bf4dd0da830b2465f51d1f215b15e20019f919
7
- data.tar.gz: 9df50c21b21b7a952816772b93ce48febe8128b81e922643743b676732dff346ba5f2a1ffe30525b53a79710b62a99b0469099eae342f3df9f07213697b0f595
6
+ metadata.gz: 5ec76c9b2975b33dc9a880493952747a65d29c37d40409b9ab0dbbb395440665b70db731a360c9497d942c47dfd69e685ff5a0416e64c849691df5a81926587f
7
+ data.tar.gz: d0939d09a6ae4c53838eee72a2028fb7a36d141f700e84e946c3e242f6daee4a40a2db24ad25bf31139cb662225cc4d483133e449bd5ed7333bc8dc176d39392
data/README.md CHANGED
@@ -81,14 +81,13 @@ Exemplo:
81
81
  customer_address_number: '111',
82
82
  customer_city_name: 'Rio de Janeiro',
83
83
  customer_cnpj_cpf: '012.345.678-90',
84
- customer_email: 'cliente@bom.com',
84
+ customer_email: 'cliente@example.com',
85
85
  customer_neighborhood: 'Sao Francisco',
86
86
  customer_person_name: 'Joao da Silva',
87
87
  customer_person_type: 'individual',
88
88
  customer_phone_number: '2112123434',
89
89
  customer_state: 'RJ',
90
- customer_zipcode: '12312-123',
91
- notification_url: 'http://example.com.br/notify'
90
+ customer_zipcode: '12312-123'
92
91
  })
93
92
 
94
93
  # Criar um novo boleto instanciando o objeto
@@ -109,8 +108,8 @@ Exemplo:
109
108
 
110
109
  # Listar os boletos
111
110
  @bank_billets = BoletoSimples::BankBillet.all(page: 1, per_page: 50)
112
- @bank_billet.each do |bank_billet|
113
- puts bank_billet.id
111
+ @bank_billets.each do |bank_billet|
112
+ puts bank_billet.attributes
114
113
  end
115
114
 
116
115
  # Após realizar a chamada na listagem, você terá acesso aos seguintes dados:
@@ -134,7 +133,7 @@ BoletoSimples.last_request.links[:last] # url da última página
134
133
  @customer = BoletoSimples::Customer.create({
135
134
  person_name: "Joao da Silva",
136
135
  cnpj_cpf: "012.345.678-90",
137
- email: "cliente@bom.com",
136
+ email: "cliente@example.com",
138
137
  address: "Rua quinhentos",
139
138
  city_name: "Rio de Janeiro",
140
139
  state: "RJ",
@@ -153,7 +152,7 @@ BoletoSimples.last_request.links[:last] # url da última página
153
152
  # Listar os clientes
154
153
  @customers = BoletoSimples::Customer.all(page: 1, per_page: 50)
155
154
  @customers.each do |customer|
156
- puts customer.id
155
+ puts customer.attributes
157
156
  end
158
157
 
159
158
  # Após realizar a chamada na listagem, você terá acesso aos seguintes dados:
@@ -176,7 +175,7 @@ BoletoSimples.last_request.links[:last] # url da última página
176
175
  # Listar todas as transações
177
176
  @transactions = BoletoSimples::Transaction.all
178
177
  @transactions.each do |transaction|
179
- puts transaction.id
178
+ puts transaction.attributes
180
179
  end
181
180
  ```
182
181
 
@@ -9,9 +9,9 @@ Gem::Specification.new do |gem|
9
9
  gem.version = BoletoSimples::VERSION
10
10
  gem.authors = ['Kivanio Barbosa', 'Rafael Lima', 'Thiago Belem']
11
11
  gem.email = ['kivanio@gmail.com', 'contato@rafael.adm.br', 'contato@thiagobelem.net']
12
- gem.description = 'An easy way to charge by bank billet.'
13
- gem.summary = 'An easy way to charge by bank billet.'
14
- gem.homepage = 'https://boletosimples.com.br'
12
+ gem.description = 'Boleto Simples API wrapper.'
13
+ gem.summary = 'Boleto Simples API wrapper.'
14
+ gem.homepage = 'https://github.com/BoletoSimples/boletosimples-ruby'
15
15
 
16
16
  gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
17
  gem.executables = gem.files.grep(/^bin\//).map { |f| File.basename(f) }
@@ -6,8 +6,9 @@ module BoletoSimples
6
6
  assign_attributes(self.class.parse(parsed_data[:data])) if parsed_data[:data].any?
7
7
  @metadata = parsed_data[:metadata]
8
8
  @response_errors = parsed_data[:errors]
9
+ @response = response
9
10
  end
10
- self
11
+ return @response.success?
11
12
  end
12
13
  end
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module BoletoSimples
2
- VERSION = '0.1.1'
2
+ VERSION = '0.2.0'
3
3
  end
@@ -22,7 +22,7 @@ RSpec.describe BoletoSimples::BankBillet do
22
22
  customer_address_number: '111',
23
23
  customer_city_name: 'Rio de Janeiro',
24
24
  customer_cnpj_cpf: '012.345.678-90',
25
- customer_email: 'cliente@bom.com',
25
+ customer_email: 'cliente@example.com',
26
26
  customer_neighborhood: 'Sao Francisco',
27
27
  customer_person_name: 'Joao da Silva',
28
28
  customer_person_type: 'individual',
@@ -63,9 +63,19 @@ RSpec.describe BoletoSimples::BankBillet do
63
63
  subject { BoletoSimples::BankBillet.find(@bank_billet.id) }
64
64
  it { expect(subject).to be_a_kind_of(BoletoSimples::BankBillet) }
65
65
  end
66
- describe 'cancel', vcr: { cassette_name: 'resources/bank_billet/cancel'} do
67
- subject { BoletoSimples::BankBillet.find(@bank_billet.id).cancel }
68
- it { expect(subject).to be_a_kind_of(BoletoSimples::BankBillet) }
66
+ describe 'cancel' do
67
+ context 'success', vcr: { cassette_name: 'resources/bank_billet/cancel/success'} do
68
+ subject { BoletoSimples::BankBillet.find(@bank_billet.id) }
69
+ it { expect(subject.cancel).to be_truthy }
70
+ end
71
+ context 'failure', vcr: { cassette_name: 'resources/bank_billet/cancel/failure'} do
72
+ subject { BoletoSimples::BankBillet.find(863) }
73
+ it { expect(subject.cancel).to be_falsy }
74
+ context 'after cancel' do
75
+ before { subject.cancel }
76
+ it { expect(subject.response_errors).to eq({:status=>["cannot transition via cancel"]}) }
77
+ end
78
+ end
69
79
  end
70
80
  describe 'all', vcr: { cassette_name: 'resources/bank_billet/all'} do
71
81
  subject { BoletoSimples::BankBillet.all }
@@ -16,7 +16,7 @@ RSpec.describe BoletoSimples::Customer do
16
16
  @customer = BoletoSimples::Customer.create({
17
17
  person_name: "Maria José",
18
18
  cnpj_cpf: "811.536.151-85",
19
- email: "cliente@bom.com",
19
+ email: "cliente@example.com",
20
20
  address: "Rua quinhentos",
21
21
  city_name: "Rio de Janeiro",
22
22
  state: "RJ",
@@ -62,27 +62,27 @@ http_interactions:
62
62
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/niriavev","customer_person_type":"individual","customer_person_name":"Joao
63
63
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
64
64
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
65
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
65
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
66
66
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":799,"expire_at":"2015-01-01","paid_at":null,"description":"Cobrança
67
67
  XPTO","status":"opened","shorten_url":"http://staging.bole.to/niq5avd4","customer_person_type":"individual","customer_person_name":"Joao
68
68
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
69
69
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
70
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
70
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
71
71
  de Janeiro","paid_amount":0.0,"amount":9.99},{"id":798,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
72
72
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/niq6avd3","customer_person_type":"individual","customer_person_name":"Joao
73
73
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
74
74
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
75
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
75
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
76
76
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":797,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
77
77
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/niq7avd2","customer_person_type":"individual","customer_person_name":"Joao
78
78
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
79
79
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
80
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
80
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
81
81
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":796,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
82
82
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/niq8avd1","customer_person_type":"individual","customer_person_name":"Joao
83
83
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
84
84
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
85
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
85
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
86
86
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":793,"expire_at":"2015-01-02","paid_at":null,"description":"Teste
87
87
  de geração de boleto","status":"opened","shorten_url":"http://staging.bole.to/nioiavbv","customer_person_type":"individual","customer_person_name":"Rodolfo
88
88
  Lima","customer_cnpj_cpf":"748.885.399-79","customer_address":null,"customer_state":null,"customer_neighborhood":null,"customer_zipcode":"24360-440","customer_address_number":null,"customer_address_complement":null,"customer_phone_number":null,"customer_email":null,"notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":null,"paid_amount":0.0,"amount":7.2},{"id":792,"expire_at":"2015-01-02","paid_at":null,"description":"Teste
@@ -62,32 +62,32 @@ http_interactions:
62
62
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/nirjavew","customer_person_type":"individual","customer_person_name":"Joao
63
63
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
64
64
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
65
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
65
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
66
66
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":850,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
67
67
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/niriavev","customer_person_type":"individual","customer_person_name":"Joao
68
68
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
69
69
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
70
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
70
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
71
71
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":799,"expire_at":"2015-01-01","paid_at":null,"description":"Cobrança
72
72
  XPTO","status":"opened","shorten_url":"http://staging.bole.to/niq5avd4","customer_person_type":"individual","customer_person_name":"Joao
73
73
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
74
74
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
75
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
75
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
76
76
  de Janeiro","paid_amount":0.0,"amount":9.99},{"id":798,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
77
77
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/niq6avd3","customer_person_type":"individual","customer_person_name":"Joao
78
78
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
79
79
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
80
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
80
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
81
81
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":797,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
82
82
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/niq7avd2","customer_person_type":"individual","customer_person_name":"Joao
83
83
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
84
84
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
85
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
85
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
86
86
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":796,"expire_at":"2014-01-01","paid_at":null,"description":"Despesas
87
87
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/niq8avd1","customer_person_type":"individual","customer_person_name":"Joao
88
88
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
89
89
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
90
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
90
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
91
91
  de Janeiro","paid_amount":0.0,"amount":9.01},{"id":793,"expire_at":"2015-01-02","paid_at":null,"description":"Teste
92
92
  de geração de boleto","status":"opened","shorten_url":"http://staging.bole.to/nioiavbv","customer_person_type":"individual","customer_person_name":"Rodolfo
93
93
  Lima","customer_cnpj_cpf":"748.885.399-79","customer_address":null,"customer_state":null,"customer_neighborhood":null,"customer_zipcode":"24360-440","customer_address_number":null,"customer_address_complement":null,"customer_phone_number":null,"customer_email":null,"notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":null,"paid_amount":0.0,"amount":7.2},{"id":792,"expire_at":"2015-01-02","paid_at":null,"description":"Teste
@@ -0,0 +1,118 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/bank_billets/863?access_token=BOLETOSIMPLES_ACCESS_TOKEN
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - BoletoSimples Ruby Client v0.1.1 (contato@boletosimples.com.br)
12
+ Authorization:
13
+ - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - Cowboy
25
+ Connection:
26
+ - keep-alive
27
+ Strict-Transport-Security:
28
+ - max-age=2592000
29
+ Content-Type:
30
+ - application/json; charset=utf-8
31
+ X-Ratelimit-Limit:
32
+ - '500'
33
+ X-Ratelimit-Remaining:
34
+ - '476'
35
+ Etag:
36
+ - W/"c607d4b12f290939443ba87e9694bd72"
37
+ Cache-Control:
38
+ - must-revalidate, private, max-age=0
39
+ X-Request-Id:
40
+ - 1f3ceac5-3ed4-42b2-9365-83440f8f578d
41
+ X-Runtime:
42
+ - '0.033791'
43
+ Date:
44
+ - Sun, 08 Mar 2015 21:15:40 GMT
45
+ X-Rack-Cache:
46
+ - miss
47
+ Vary:
48
+ - Accept-Encoding
49
+ Transfer-Encoding:
50
+ - chunked
51
+ Via:
52
+ - 1.1 vegur
53
+ body:
54
+ encoding: UTF-8
55
+ string: '{"id":863,"expire_at":"2014-01-01","paid_at":"2015-03-08","description":"Despesas
56
+ do contrato 0012","status":"paid","shorten_url":"http://staging.bole.to/nis1avf8","customer_person_type":"individual","customer_person_name":"Joao
57
+ da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
58
+ Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
59
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":null,"send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
60
+ de Janeiro","paid_amount":9.01,"amount":9.01}'
61
+ http_version:
62
+ recorded_at: Sun, 08 Mar 2015 21:15:40 GMT
63
+ - request:
64
+ method: put
65
+ uri: https://sandbox.boletosimples.com.br/api/v1/bank_billets/863/cancel?access_token=BOLETOSIMPLES_ACCESS_TOKEN
66
+ body:
67
+ encoding: UTF-8
68
+ string: "{}"
69
+ headers:
70
+ User-Agent:
71
+ - BoletoSimples Ruby Client v0.1.1 (contato@boletosimples.com.br)
72
+ Authorization:
73
+ - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
74
+ Content-Type:
75
+ - application/json
76
+ Accept-Encoding:
77
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
78
+ Accept:
79
+ - "*/*"
80
+ response:
81
+ status:
82
+ code: 422
83
+ message: Unprocessable Entity
84
+ headers:
85
+ Server:
86
+ - Cowboy
87
+ Connection:
88
+ - keep-alive
89
+ Strict-Transport-Security:
90
+ - max-age=2592000
91
+ Content-Type:
92
+ - application/json; charset=utf-8
93
+ X-Ratelimit-Limit:
94
+ - '500'
95
+ X-Ratelimit-Remaining:
96
+ - '475'
97
+ Cache-Control:
98
+ - no-cache
99
+ X-Request-Id:
100
+ - c81a3615-db53-4419-806d-5e35dc23aee8
101
+ X-Runtime:
102
+ - '0.035312'
103
+ Date:
104
+ - Sun, 08 Mar 2015 21:15:41 GMT
105
+ X-Rack-Cache:
106
+ - invalidate, pass
107
+ Vary:
108
+ - Accept-Encoding
109
+ Transfer-Encoding:
110
+ - chunked
111
+ Via:
112
+ - 1.1 vegur
113
+ body:
114
+ encoding: UTF-8
115
+ string: '{"errors":{"status":["cannot transition via cancel"]}}'
116
+ http_version:
117
+ recorded_at: Sun, 08 Mar 2015 21:15:40 GMT
118
+ recorded_with: VCR 2.9.3
@@ -56,7 +56,7 @@ http_interactions:
56
56
  do contrato 0012","status":"opened","shorten_url":"http://staging.bole.to/nirjavew","customer_person_type":"individual","customer_person_name":"Joao
57
57
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
58
58
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
59
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
59
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
60
60
  de Janeiro","paid_amount":0.0,"amount":9.01}'
61
61
  http_version:
62
62
  recorded_at: Sun, 08 Mar 2015 19:55:36 GMT
@@ -118,7 +118,7 @@ http_interactions:
118
118
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/nirjavew","customer_person_type":"individual","customer_person_name":"Joao
119
119
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
120
120
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
121
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
121
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
122
122
  de Janeiro","paid_amount":0.0,"amount":9.01}'
123
123
  http_version:
124
124
  recorded_at: Sun, 08 Mar 2015 19:55:37 GMT
@@ -7,7 +7,7 @@ http_interactions:
7
7
  encoding: UTF-8
8
8
  string: '{"bank_billet":{"amount":9.01,"description":"Despesas do contrato 0012","expire_at":"2014-01-01","customer_address":"Rua
9
9
  quinhentos","customer_address_complement":"Sala 4","customer_address_number":"111","customer_city_name":"Rio
10
- de Janeiro","customer_cnpj_cpf":"012.345.678-90","customer_email":"cliente@bom.com","customer_neighborhood":"Sao
10
+ de Janeiro","customer_cnpj_cpf":"012.345.678-90","customer_email":"cliente@example.com","customer_neighborhood":"Sao
11
11
  Francisco","customer_person_name":"Joao da Silva","customer_person_type":"individual","customer_phone_number":"2112123434","customer_state":"RJ","customer_zipcode":"12312-123","notification_url":"http://example.com.br/notify"}}'
12
12
  headers:
13
13
  User-Agent:
@@ -63,7 +63,7 @@ http_interactions:
63
63
  do contrato 0012","status":"generating","shorten_url":null,"customer_person_type":"individual","customer_person_name":"Joao
64
64
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
65
65
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
66
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
66
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
67
67
  de Janeiro","paid_amount":0.0,"amount":9.01}'
68
68
  http_version:
69
69
  recorded_at: Sun, 08 Mar 2015 19:55:32 GMT
@@ -56,7 +56,7 @@ http_interactions:
56
56
  do contrato 0012","status":"canceled","shorten_url":"http://staging.bole.to/nirjavew","customer_person_type":"individual","customer_person_name":"Joao
57
57
  da Silva","customer_cnpj_cpf":"012.345.678-90","customer_address":"Rua quinhentos","customer_state":"RJ","customer_neighborhood":"Sao
58
58
  Francisco","customer_zipcode":"12312-123","customer_address_number":"111","customer_address_complement":"Sala
59
- 4","customer_phone_number":"2112123434","customer_email":"cliente@bom.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
59
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","notification_url":"http://example.com.br/notify","send_email_on_creation":null,"created_via_api":true,"customer_city_name":"Rio
60
60
  de Janeiro","paid_amount":0.0,"amount":9.01}'
61
61
  http_version:
62
62
  recorded_at: Sun, 08 Mar 2015 19:55:38 GMT
@@ -55,17 +55,17 @@ http_interactions:
55
55
  body:
56
56
  encoding: UTF-8
57
57
  string: '[{"id":57,"city_name":"Rio de Janeiro","person_name":"Joao da Silva","address":"Rua
58
- quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"012.345.678-90","email":"cliente@bom.com","neighborhood":"Sao
58
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"012.345.678-90","email":"cliente@example.com","neighborhood":"Sao
59
59
  Francisco","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":63,"city_name":"Rio
60
60
  de Janeiro","person_name":"Joao da Silva","address":"Rua quinhentos","address_complement":"Sala
61
- 4","address_number":"111","mobile_number":null,"cnpj_cpf":"321.315.217-07","email":"cliente@bom.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":64,"city_name":null,"person_name":"Joao
61
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"321.315.217-07","email":"cliente@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":64,"city_name":null,"person_name":"Joao
62
62
  da Silva","address":null,"address_complement":null,"address_number":null,"mobile_number":null,"cnpj_cpf":"828.788.171-41","email":null,"neighborhood":null,"person_type":"individual","phone_number":null,"zipcode":"12312-123","mobile_local_code":null,"state":null,"created_via_api":true},{"id":65,"city_name":"Rio
63
63
  de Janeiro","person_name":"Maria José","address":"Rua quinhentos","address_complement":"Sala
64
- 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@bom.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":58,"city_name":"Rio
64
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":58,"city_name":"Rio
65
65
  de Janeiro","person_name":"Maria José","address":"Rua quinhentos","address_complement":"Sala
66
- 4","address_number":"111","mobile_number":null,"cnpj_cpf":"223.886.692-27","email":"cliente@bom.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":59,"city_name":"Rio
66
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"223.886.692-27","email":"cliente@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":59,"city_name":"Rio
67
67
  de Janeiro","person_name":"Maria José","address":"Rua quinhentos","address_complement":"Sala
68
- 4","address_number":"111","mobile_number":null,"cnpj_cpf":"79.563.027/0001-42","email":"cliente@bom.com","neighborhood":"bairro","person_type":"juridical","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":60,"city_name":null,"person_name":"Rodolfo
68
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"79.563.027/0001-42","email":"cliente@example.com","neighborhood":"bairro","person_type":"juridical","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true},{"id":60,"city_name":null,"person_name":"Rodolfo
69
69
  Lima","address":null,"address_complement":null,"address_number":null,"mobile_number":null,"cnpj_cpf":"748.885.399-79","email":null,"neighborhood":null,"person_type":"individual","phone_number":null,"zipcode":"24360-440","mobile_local_code":null,"state":null,"created_via_api":true}]'
70
70
  http_version:
71
71
  recorded_at: Sun, 08 Mar 2015 19:59:21 GMT
@@ -5,7 +5,7 @@ http_interactions:
5
5
  uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"customer":{"person_name":"Maria José","cnpj_cpf":"811.536.151-85","email":"cliente@bom.com","address":"Rua
8
+ string: '{"customer":{"person_name":"Maria José","cnpj_cpf":"811.536.151-85","email":"cliente@example.com","address":"Rua
9
9
  quinhentos","city_name":"Rio de Janeiro","state":"RJ","neighborhood":"bairro","zipcode":"12312-123","address_number":"111","address_complement":"Sala
10
10
  4","phone_number":"2112123434"}}'
11
11
  headers:
@@ -59,7 +59,7 @@ http_interactions:
59
59
  body:
60
60
  encoding: UTF-8
61
61
  string: '{"id":65,"city_name":"Rio de Janeiro","person_name":"Maria José","address":"Rua
62
- quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@bom.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true}'
62
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true}'
63
63
  http_version:
64
64
  recorded_at: Sun, 08 Mar 2015 19:59:17 GMT
65
65
  recorded_with: VCR 2.9.3
@@ -53,7 +53,7 @@ http_interactions:
53
53
  body:
54
54
  encoding: UTF-8
55
55
  string: '{"id":65,"city_name":"Rio de Janeiro","person_name":"Maria José","address":"Rua
56
- quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@bom.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true}'
56
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true}'
57
57
  http_version:
58
58
  recorded_at: Sun, 08 Mar 2015 19:59:18 GMT
59
59
  recorded_with: VCR 2.9.3
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boletosimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kivanio Barbosa
@@ -152,7 +152,7 @@ dependencies:
152
152
  - - "~>"
153
153
  - !ruby/object:Gem::Version
154
154
  version: 0.4.7
155
- description: An easy way to charge by bank billet.
155
+ description: Boleto Simples API wrapper.
156
156
  email:
157
157
  - kivanio@gmail.com
158
158
  - contato@rafael.adm.br
@@ -201,7 +201,8 @@ files:
201
201
  - spec/fixtures/vcr_cassettes/last_request/bank_billets.yml
202
202
  - spec/fixtures/vcr_cassettes/last_request/userinfo.yml
203
203
  - spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml
204
- - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel.yml
204
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml
205
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml
205
206
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml
206
207
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml
207
208
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml
@@ -216,7 +217,7 @@ files:
216
217
  - spec/spec.opts
217
218
  - spec/spec_helper.rb
218
219
  - spec/support/vcr.rb
219
- homepage: https://boletosimples.com.br
220
+ homepage: https://github.com/BoletoSimples/boletosimples-ruby
220
221
  licenses: []
221
222
  metadata: {}
222
223
  post_install_message:
@@ -238,7 +239,7 @@ rubyforge_project:
238
239
  rubygems_version: 2.2.2
239
240
  signing_key:
240
241
  specification_version: 4
241
- summary: An easy way to charge by bank billet.
242
+ summary: Boleto Simples API wrapper.
242
243
  test_files:
243
244
  - spec/boletosimples/configuration_spec.rb
244
245
  - spec/boletosimples/extra_spec.rb
@@ -254,7 +255,8 @@ test_files:
254
255
  - spec/fixtures/vcr_cassettes/last_request/bank_billets.yml
255
256
  - spec/fixtures/vcr_cassettes/last_request/userinfo.yml
256
257
  - spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml
257
- - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel.yml
258
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml
259
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml
258
260
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml
259
261
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml
260
262
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml