boletosimples 0.0.7 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +1 -1
  3. data/README.md +156 -3
  4. data/boletosimples.gemspec +9 -9
  5. data/lib/boletosimples.rb +38 -4
  6. data/lib/boletosimples/configuration.rb +69 -0
  7. data/lib/boletosimples/extra.rb +8 -0
  8. data/lib/boletosimples/last_request.rb +43 -0
  9. data/lib/boletosimples/middlewares/last_request.rb +9 -0
  10. data/lib/boletosimples/middlewares/raise_error.rb +11 -0
  11. data/lib/boletosimples/middlewares/user_agent.rb +10 -0
  12. data/lib/boletosimples/resources/bank_billet.rb +13 -0
  13. data/lib/boletosimples/resources/base_model.rb +8 -0
  14. data/lib/boletosimples/resources/customer.rb +4 -0
  15. data/lib/boletosimples/resources/partner/user.rb +7 -0
  16. data/lib/boletosimples/resources/transaction.rb +4 -0
  17. data/lib/boletosimples/response_error.rb +43 -0
  18. data/lib/boletosimples/version.rb +1 -1
  19. data/spec/boletosimples/configuration_spec.rb +84 -0
  20. data/spec/boletosimples/extra_spec.rb +31 -0
  21. data/spec/boletosimples/last_request_spec.rb +34 -0
  22. data/spec/boletosimples/resources/bank_billet_spec.rb +75 -0
  23. data/spec/boletosimples/resources/customer_spec.rb +66 -0
  24. data/spec/boletosimples/resources/partner/user_spec.rb +19 -0
  25. data/spec/boletosimples/resources/transactions_spec.rb +17 -0
  26. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml +64 -0
  27. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml +56 -0
  28. data/spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml +58 -0
  29. data/spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml +54 -0
  30. data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +129 -0
  31. data/spec/fixtures/vcr_cassettes/last_request/userinfo.yml +58 -0
  32. data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +132 -0
  33. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel.yml +125 -0
  34. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +61 -0
  35. data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_cancel_bank_billet/already_canceled.yml → resources/bank_billet/create/invalid_root.yml} +24 -24
  36. data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_create_bank_billet/with_valid_data.yml → resources/bank_billet/create/valid.yml} +32 -28
  37. data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_bank_billet/existing_bank_billet.yml → resources/bank_billet/find.yml} +30 -28
  38. data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +72 -0
  39. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +59 -0
  40. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +58 -0
  41. data/spec/fixtures/vcr_cassettes/{BoletoSimples_Client/_create_customer/with_valid_data.yml → resources/customer/create/valid.yml} +30 -26
  42. data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +59 -0
  43. data/spec/fixtures/vcr_cassettes/resources/partner/user/create.yml +60 -0
  44. data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +62 -0
  45. data/spec/spec_helper.rb +10 -0
  46. data/spec/support/vcr.rb +8 -0
  47. metadata +97 -80
  48. data/example/access_token_example.rb +0 -79
  49. data/example/oauth_example.rb +0 -126
  50. data/lib/boletosimples/client.rb +0 -100
  51. data/lib/boletosimples/oauth_client.rb +0 -74
  52. data/spec/boletosimples/client_spec.rb +0 -415
  53. data/spec/boletosimples/oauth_client_spec.rb +0 -17
  54. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_bank_billet/not_found.yml +0 -44
  55. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_bank_billets.yml +0 -63
  56. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_cancel_bank_billet/with_invalid_bank_billet.yml +0 -54
  57. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_cancel_bank_billet/with_valid_bank_billet.yml +0 -71
  58. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_create_bank_billet/with_invalid_data.yml +0 -64
  59. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_create_customer/with_invalid_data.yml +0 -59
  60. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customer/existing_customer.yml +0 -57
  61. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customer/not_found.yml +0 -58
  62. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_customers.yml +0 -59
  63. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_transactions.yml +0 -67
  64. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/with_authentication.yml +0 -56
  65. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/with_authentication/.yml +0 -56
  66. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/without_authentication.yml +0 -54
  67. data/spec/fixtures/vcr_cassettes/BoletoSimples_Client/_userinfo/without_authentication/.yml +0 -54
  68. 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=9e616874dbf0674ace28170a748c9258ac1f0f87e0a544441ebffe976645bc09
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":"Joao da Silva","cnpj_cpf":"012.345.678-90","email":"cliente@bom.com","address":"Rua
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
- User-Agent:
15
- - Meu e-Commerce (meuecommerce@example.com)
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
- - close
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/32
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
- - '"4ed60beb3944fda9bb1e0c5d319c4bb3"'
42
+ - W/"f198f003d0efa5f1e98adab6fe1a196f"
43
43
  Cache-Control:
44
44
  - max-age=0, private, must-revalidate
45
45
  X-Request-Id:
46
- - 0bf0c4a8-d29c-47a1-98f6-0d08b786ed7a
47
- X-Ratelimit-Limit:
48
- - '500'
49
- X-Ratelimit-Remaining:
50
- - '499'
46
+ - 12c35d9a-04c8-4f17-8d0a-641af68a6284
51
47
  X-Runtime:
52
- - '0.205672'
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":32,"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":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ"}'
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: Fri, 24 Oct 2014 17:59:16 GMT
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