boletosimples 0.0.7 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +1 -1
- data/README.md +156 -3
- data/boletosimples.gemspec +9 -9
- data/lib/boletosimples.rb +38 -4
- data/lib/boletosimples/configuration.rb +69 -0
- data/lib/boletosimples/extra.rb +8 -0
- data/lib/boletosimples/last_request.rb +43 -0
- data/lib/boletosimples/middlewares/last_request.rb +9 -0
- data/lib/boletosimples/middlewares/raise_error.rb +11 -0
- data/lib/boletosimples/middlewares/user_agent.rb +10 -0
- data/lib/boletosimples/resources/bank_billet.rb +13 -0
- data/lib/boletosimples/resources/base_model.rb +8 -0
- data/lib/boletosimples/resources/customer.rb +4 -0
- data/lib/boletosimples/resources/partner/user.rb +7 -0
- data/lib/boletosimples/resources/transaction.rb +4 -0
- data/lib/boletosimples/response_error.rb +43 -0
- data/lib/boletosimples/version.rb +1 -1
- data/spec/boletosimples/configuration_spec.rb +84 -0
- data/spec/boletosimples/extra_spec.rb +31 -0
- data/spec/boletosimples/last_request_spec.rb +34 -0
- data/spec/boletosimples/resources/bank_billet_spec.rb +75 -0
- data/spec/boletosimples/resources/customer_spec.rb +66 -0
- data/spec/boletosimples/resources/partner/user_spec.rb +19 -0
- data/spec/boletosimples/resources/transactions_spec.rb +17 -0
- data/spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml +64 -0
- data/spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml +56 -0
- data/spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml +58 -0
- data/spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml +54 -0
- data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +129 -0
- data/spec/fixtures/vcr_cassettes/last_request/userinfo.yml +58 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +132 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel.yml +125 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +61 -0
- data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_cancel_bank_billet/already_canceled.yml → resources/bank_billet/create/invalid_root.yml} +24 -24
- data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_create_bank_billet/with_valid_data.yml → resources/bank_billet/create/valid.yml} +32 -28
- data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_bank_billet/existing_bank_billet.yml → resources/bank_billet/find.yml} +30 -28
- data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +72 -0
- data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +59 -0
- data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +58 -0
- data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_create_customer/with_valid_data.yml → resources/customer/create/valid.yml} +30 -26
- data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +59 -0
- data/spec/fixtures/vcr_cassettes/resources/partner/user/create.yml +60 -0
- data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +62 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/support/vcr.rb +8 -0
- metadata +97 -80
- data/example/access_token_example.rb +0 -79
- data/example/oauth_example.rb +0 -126
- data/lib/boletosimples/client.rb +0 -100
- data/lib/boletosimples/oauth_client.rb +0 -74
- data/spec/boletosimples/client_spec.rb +0 -415
- data/spec/boletosimples/oauth_client_spec.rb +0 -17
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_bank_billet/not_found.yml +0 -44
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_bank_billets.yml +0 -63
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_cancel_bank_billet/with_invalid_bank_billet.yml +0 -54
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_cancel_bank_billet/with_valid_bank_billet.yml +0 -71
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_create_bank_billet/with_invalid_data.yml +0 -64
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_create_customer/with_invalid_data.yml +0 -59
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customer/existing_customer.yml +0 -57
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customer/not_found.yml +0 -58
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customers.yml +0 -59
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_transactions.yml +0 -67
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/with_authentication.yml +0 -56
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/with_authentication/.yml +0 -56
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/without_authentication.yml +0 -54
- data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/without_authentication/.yml +0 -54
- data/spec/fixtures/vcr_cassettes/BoletoSimples_OAuthClient/_userinfo/without_authentication/.yml +0 -62
@@ -0,0 +1,72 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (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
|
+
Total:
|
30
|
+
- '7'
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Ratelimit-Limit:
|
34
|
+
- '500'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '454'
|
37
|
+
Etag:
|
38
|
+
- W/"11587a934bf44302614d1baa9fd3af13"
|
39
|
+
Cache-Control:
|
40
|
+
- must-revalidate, private, max-age=0
|
41
|
+
X-Request-Id:
|
42
|
+
- b96cbb79-dfc0-4591-99ee-5d10f11d37b8
|
43
|
+
X-Runtime:
|
44
|
+
- '0.044722'
|
45
|
+
Date:
|
46
|
+
- Sun, 08 Mar 2015 19:59:22 GMT
|
47
|
+
X-Rack-Cache:
|
48
|
+
- miss
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
|
+
Transfer-Encoding:
|
52
|
+
- chunked
|
53
|
+
Via:
|
54
|
+
- 1.1 vegur
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
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
|
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
|
+
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
|
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
|
+
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
|
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
|
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
|
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
|
+
http_version:
|
71
|
+
recorded_at: Sun, 08 Mar 2015 19:59:21 GMT
|
72
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"customer":{"person_name":""}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
|
12
|
+
Authorization:
|
13
|
+
- Token token="BOLETOSIMPLES_ACCESS_TOKEN"
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=2592000
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Ratelimit-Limit:
|
34
|
+
- '500'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '455'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Request-Id:
|
40
|
+
- bdd0e8f4-4742-4b6f-87af-abd3c192ee33
|
41
|
+
X-Runtime:
|
42
|
+
- '0.045134'
|
43
|
+
Date:
|
44
|
+
- Sun, 08 Mar 2015 19:59:21 GMT
|
45
|
+
X-Rack-Cache:
|
46
|
+
- invalidate, pass
|
47
|
+
Vary:
|
48
|
+
- Accept-Encoding
|
49
|
+
Transfer-Encoding:
|
50
|
+
- chunked
|
51
|
+
Via:
|
52
|
+
- 1.1 vegur
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"errors":{"person_name":["não pode ficar em branco"],"cnpj_cpf":["não
|
56
|
+
pode ficar em branco"],"zipcode":["não pode ficar em branco"]}}'
|
57
|
+
http_version:
|
58
|
+
recorded_at: Sun, 08 Mar 2015 19:59:20 GMT
|
59
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,58 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"customer":{}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
|
12
|
+
Authorization:
|
13
|
+
- Token token="BOLETOSIMPLES_ACCESS_TOKEN"
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 422
|
23
|
+
message: Unprocessable Entity
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=2592000
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Ratelimit-Limit:
|
34
|
+
- '500'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '456'
|
37
|
+
Cache-Control:
|
38
|
+
- no-cache
|
39
|
+
X-Request-Id:
|
40
|
+
- 1119bf7c-038c-4c5a-a2c2-e5c5c66097fd
|
41
|
+
X-Runtime:
|
42
|
+
- '0.119195'
|
43
|
+
Date:
|
44
|
+
- Sun, 08 Mar 2015 19:59:20 GMT
|
45
|
+
X-Rack-Cache:
|
46
|
+
- invalidate, pass
|
47
|
+
Vary:
|
48
|
+
- Accept-Encoding
|
49
|
+
Transfer-Encoding:
|
50
|
+
- chunked
|
51
|
+
Via:
|
52
|
+
- 1.1 vegur
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: '{"errors":{"customer":["não pode ficar em branco"]}}'
|
56
|
+
http_version:
|
57
|
+
recorded_at: Sun, 08 Mar 2015 19:59:19 GMT
|
58
|
+
recorded_with: VCR 2.9.3
|
@@ -2,17 +2,23 @@
|
|
2
2
|
http_interactions:
|
3
3
|
- request:
|
4
4
|
method: post
|
5
|
-
uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=
|
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":"
|
8
|
+
string: '{"customer":{"person_name":"Maria José","cnpj_cpf":"811.536.151-85","email":"cliente@bom.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:
|
12
|
+
User-Agent:
|
13
|
+
- BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
|
14
|
+
Authorization:
|
15
|
+
- Token token="BOLETOSIMPLES_ACCESS_TOKEN"
|
12
16
|
Content-Type:
|
13
17
|
- application/json
|
14
|
-
|
15
|
-
-
|
18
|
+
Accept-Encoding:
|
19
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
20
|
+
Accept:
|
21
|
+
- "*/*"
|
16
22
|
response:
|
17
23
|
status:
|
18
24
|
code: 201
|
@@ -21,41 +27,39 @@ http_interactions:
|
|
21
27
|
Server:
|
22
28
|
- Cowboy
|
23
29
|
Connection:
|
24
|
-
-
|
25
|
-
Date:
|
26
|
-
- Fri, 24 Oct 2014 17:59:16 GMT
|
27
|
-
Status:
|
28
|
-
- 201 Created
|
30
|
+
- keep-alive
|
29
31
|
Strict-Transport-Security:
|
30
32
|
- max-age=2592000
|
31
|
-
X-Frame-Options:
|
32
|
-
- SAMEORIGIN
|
33
|
-
X-Xss-Protection:
|
34
|
-
- 1; mode=block
|
35
|
-
X-Content-Type-Options:
|
36
|
-
- nosniff
|
37
33
|
Location:
|
38
|
-
- https://sandbox.boletosimples.com.br/api/v1/customers/
|
34
|
+
- https://sandbox.boletosimples.com.br/api/v1/customers/65
|
39
35
|
Content-Type:
|
40
36
|
- application/json; charset=utf-8
|
37
|
+
X-Ratelimit-Limit:
|
38
|
+
- '500'
|
39
|
+
X-Ratelimit-Remaining:
|
40
|
+
- '458'
|
41
41
|
Etag:
|
42
|
-
-
|
42
|
+
- W/"f198f003d0efa5f1e98adab6fe1a196f"
|
43
43
|
Cache-Control:
|
44
44
|
- max-age=0, private, must-revalidate
|
45
45
|
X-Request-Id:
|
46
|
-
-
|
47
|
-
X-Ratelimit-Limit:
|
48
|
-
- '500'
|
49
|
-
X-Ratelimit-Remaining:
|
50
|
-
- '499'
|
46
|
+
- 12c35d9a-04c8-4f17-8d0a-641af68a6284
|
51
47
|
X-Runtime:
|
52
|
-
- '0.
|
48
|
+
- '0.109969'
|
49
|
+
Date:
|
50
|
+
- Sun, 08 Mar 2015 19:59:18 GMT
|
51
|
+
X-Rack-Cache:
|
52
|
+
- invalidate, pass
|
53
|
+
Vary:
|
54
|
+
- Accept-Encoding
|
55
|
+
Transfer-Encoding:
|
56
|
+
- chunked
|
53
57
|
Via:
|
54
58
|
- 1.1 vegur
|
55
59
|
body:
|
56
60
|
encoding: UTF-8
|
57
|
-
string: '{"id":
|
58
|
-
quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
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}'
|
59
63
|
http_version:
|
60
|
-
recorded_at:
|
64
|
+
recorded_at: Sun, 08 Mar 2015 19:59:17 GMT
|
61
65
|
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,59 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/customers/65?access_token=BOLETOSIMPLES_ACCESS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (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
|
+
- '457'
|
35
|
+
Etag:
|
36
|
+
- W/"f198f003d0efa5f1e98adab6fe1a196f"
|
37
|
+
Cache-Control:
|
38
|
+
- must-revalidate, private, max-age=0
|
39
|
+
X-Request-Id:
|
40
|
+
- c9e2002f-00e7-42b3-840e-2c29874fcc20
|
41
|
+
X-Runtime:
|
42
|
+
- '0.087909'
|
43
|
+
Date:
|
44
|
+
- Sun, 08 Mar 2015 19:59:19 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":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}'
|
57
|
+
http_version:
|
58
|
+
recorded_at: Sun, 08 Mar 2015 19:59:18 GMT
|
59
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,60 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/partner/users?access_token=BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: '{"user":{"email":"user2@example.com"}}'
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
|
12
|
+
Authorization:
|
13
|
+
- Token token="BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN"
|
14
|
+
Content-Type:
|
15
|
+
- application/json
|
16
|
+
Accept-Encoding:
|
17
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
18
|
+
Accept:
|
19
|
+
- "*/*"
|
20
|
+
response:
|
21
|
+
status:
|
22
|
+
code: 201
|
23
|
+
message: Created
|
24
|
+
headers:
|
25
|
+
Server:
|
26
|
+
- Cowboy
|
27
|
+
Connection:
|
28
|
+
- keep-alive
|
29
|
+
Strict-Transport-Security:
|
30
|
+
- max-age=2592000
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Ratelimit-Limit:
|
34
|
+
- '500'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '499'
|
37
|
+
Etag:
|
38
|
+
- W/"ece5dc3afb4325911152bfc2bfc04d45"
|
39
|
+
Cache-Control:
|
40
|
+
- max-age=0, private, must-revalidate
|
41
|
+
X-Request-Id:
|
42
|
+
- 23bd5205-8955-4316-887f-b9e92643908b
|
43
|
+
X-Runtime:
|
44
|
+
- '4.385478'
|
45
|
+
Date:
|
46
|
+
- Sun, 08 Mar 2015 20:02:43 GMT
|
47
|
+
X-Rack-Cache:
|
48
|
+
- invalidate, pass
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
|
+
Transfer-Encoding:
|
52
|
+
- chunked
|
53
|
+
Via:
|
54
|
+
- 1.1 vegur
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '{"id":60,"email":"user2@example.com","account_type":null,"sex":null,"cpf":null,"address_street_name":null,"address_state":null,"address_neighborhood":null,"address_postal_code":null,"address_number":null,"address_complement":null,"phone_number":null,"withdrawal_period":"biweekly","notification_url":null,"first_name":null,"middle_name":null,"last_name":null,"date_of_birth":null,"business_category":null,"business_subcategory":null,"business_website":null,"business_name":null,"business_legal_name":null,"business_type":null,"business_cnpj":null,"address_city_name":null,"full_name":null,"login_url":"https://sandbox.boletosimples.com.br/welcome?email=user2%40example.com\u0026token=xxx","mother_name":null,"father_name":null,"application_access_token":"xxx"}'
|
58
|
+
http_version:
|
59
|
+
recorded_at: Sun, 08 Mar 2015 20:02:42 GMT
|
60
|
+
recorded_with: VCR 2.9.3
|
@@ -0,0 +1,62 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://sandbox.boletosimples.com.br/api/v1/transactions?access_token=BOLETOSIMPLES_ACCESS_TOKEN
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
User-Agent:
|
11
|
+
- BoletoSimples Ruby Client v0.1.0 (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
|
+
Total:
|
30
|
+
- '2'
|
31
|
+
Content-Type:
|
32
|
+
- application/json; charset=utf-8
|
33
|
+
X-Ratelimit-Limit:
|
34
|
+
- '500'
|
35
|
+
X-Ratelimit-Remaining:
|
36
|
+
- '467'
|
37
|
+
Etag:
|
38
|
+
- W/"2e1210e97d24b7cdbb9fc07792ae2aed"
|
39
|
+
Cache-Control:
|
40
|
+
- must-revalidate, private, max-age=0
|
41
|
+
X-Request-Id:
|
42
|
+
- 13ec92f4-227a-4a3b-b9bd-132b34206857
|
43
|
+
X-Runtime:
|
44
|
+
- '0.103404'
|
45
|
+
Date:
|
46
|
+
- Sun, 08 Mar 2015 19:55:31 GMT
|
47
|
+
X-Rack-Cache:
|
48
|
+
- miss
|
49
|
+
Vary:
|
50
|
+
- Accept-Encoding
|
51
|
+
Transfer-Encoding:
|
52
|
+
- chunked
|
53
|
+
Via:
|
54
|
+
- 1.1 vegur
|
55
|
+
body:
|
56
|
+
encoding: UTF-8
|
57
|
+
string: '[{"id":59,"amount":9.01,"created_at":"2015-02-10","description":"Boleto
|
58
|
+
Bancário 688","kind":"credit","processed_at":"2015-02-19","sent_at":null,"status":"processed","credit_at":"2015-02-19"},{"id":60,"amount":-5.0,"created_at":"2015-02-10","description":"Boleto
|
59
|
+
Bancário 688","kind":"fee","processed_at":"2015-02-19","sent_at":null,"status":"processed","credit_at":"2015-02-19"}]'
|
60
|
+
http_version:
|
61
|
+
recorded_at: Sun, 08 Mar 2015 19:55:31 GMT
|
62
|
+
recorded_with: VCR 2.9.3
|