boletosimples 0.4.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +6 -14
  3. data/README.md +12 -54
  4. data/lib/boletosimples.rb +10 -6
  5. data/lib/boletosimples/configuration.rb +18 -33
  6. data/lib/boletosimples/last_request.rb +12 -9
  7. data/lib/boletosimples/middlewares/bearer.rb +12 -0
  8. data/lib/boletosimples/middlewares/last_request.rb +3 -1
  9. data/lib/boletosimples/middlewares/raise_error.rb +9 -2
  10. data/lib/boletosimples/middlewares/user_agent.rb +3 -1
  11. data/lib/boletosimples/resources/bank_billet.rb +5 -11
  12. data/lib/boletosimples/resources/bank_billet_account.rb +3 -1
  13. data/lib/boletosimples/resources/bank_billet_discharge.rb +6 -0
  14. data/lib/boletosimples/resources/bank_billet_payment.rb +6 -0
  15. data/lib/boletosimples/resources/bank_billet_remittance.rb +6 -0
  16. data/lib/boletosimples/resources/base_model.rb +3 -1
  17. data/lib/boletosimples/resources/customer.rb +3 -1
  18. data/lib/boletosimples/resources/customer_import.rb +8 -0
  19. data/lib/boletosimples/resources/customer_subscription.rb +3 -10
  20. data/lib/boletosimples/resources/customer_subscription_import.rb +8 -0
  21. data/lib/boletosimples/resources/discharge.rb +4 -11
  22. data/lib/boletosimples/resources/email_delivery.rb +6 -0
  23. data/lib/boletosimples/resources/event.rb +3 -1
  24. data/lib/boletosimples/resources/installment.rb +3 -1
  25. data/lib/boletosimples/resources/remittance.rb +3 -1
  26. data/lib/boletosimples/resources/sms_delivery.rb +6 -0
  27. data/lib/boletosimples/resources/transaction.rb +3 -1
  28. data/lib/boletosimples/resources/webhook.rb +3 -1
  29. data/lib/boletosimples/resources/webhook_delivery.rb +3 -1
  30. data/lib/boletosimples/response_error.rb +8 -3
  31. data/lib/boletosimples/version.rb +3 -1
  32. data/spec/boletosimples/configuration_spec.rb +71 -83
  33. data/spec/boletosimples/last_request_spec.rb +16 -28
  34. data/spec/boletosimples/resources/bank_billet_account_spec.rb +57 -33
  35. data/spec/boletosimples/resources/bank_billet_discharge_spec.rb +12 -0
  36. data/spec/boletosimples/resources/bank_billet_payment_spec.rb +12 -0
  37. data/spec/boletosimples/resources/bank_billet_remittance_spec.rb +12 -0
  38. data/spec/boletosimples/resources/bank_billet_spec.rb +56 -42
  39. data/spec/boletosimples/resources/customer_import_spec.rb +67 -0
  40. data/spec/boletosimples/resources/customer_spec.rb +52 -39
  41. data/spec/boletosimples/resources/customer_subscription_import_spec.rb +67 -0
  42. data/spec/boletosimples/resources/customer_subscription_spec.rb +61 -33
  43. data/spec/boletosimples/resources/discharge_spec.rb +64 -11
  44. data/spec/boletosimples/resources/email_delivery_spec.rb +12 -0
  45. data/spec/boletosimples/resources/event_spec.rb +7 -12
  46. data/spec/boletosimples/resources/installment_spec.rb +61 -32
  47. data/spec/boletosimples/resources/remittance_spec.rb +7 -12
  48. data/spec/boletosimples/resources/sms_delivery_spec.rb +12 -0
  49. data/spec/boletosimples/resources/transactions_spec.rb +7 -12
  50. data/spec/boletosimples/resources/webhook_delivery_spec.rb +7 -12
  51. data/spec/boletosimples/resources/webhook_spec.rb +7 -12
  52. data/spec/fixtures/customer_imports.csv +1 -0
  53. data/spec/fixtures/customer_subscription_imports.csv +1 -0
  54. data/spec/fixtures/discharge.RET +3 -0
  55. data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +536 -88
  56. data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +537 -91
  57. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml +34 -92
  58. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +32 -20
  59. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml +28 -17
  60. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml +43 -27
  61. data/spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml +83 -0
  62. data/spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml +51 -27
  63. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml +131 -20
  64. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml +34 -20
  65. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml +30 -19
  66. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml +41 -21
  67. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml +38 -18
  68. data/spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml +97 -0
  69. data/spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml +75 -0
  70. data/spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml +126 -0
  71. data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +79 -32
  72. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +30 -17
  73. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +28 -17
  74. data/spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml +33 -21
  75. data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +33 -19
  76. data/spec/fixtures/vcr_cassettes/resources/customer_import/all.yml +74 -0
  77. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml +69 -0
  78. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml +69 -0
  79. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml +76 -0
  80. data/spec/fixtures/vcr_cassettes/resources/customer_import/find.yml +71 -0
  81. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml +102 -52
  82. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml +40 -50
  83. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml +36 -48
  84. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml +48 -53
  85. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml +44 -50
  86. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml +45 -133
  87. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml +75 -0
  88. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml +69 -0
  89. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml +70 -0
  90. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml +76 -0
  91. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml +71 -0
  92. data/spec/fixtures/vcr_cassettes/resources/discharge/all.yml +64 -33
  93. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml +70 -0
  94. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml +69 -0
  95. data/spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml +84 -0
  96. data/spec/fixtures/vcr_cassettes/resources/discharge/find.yml +71 -0
  97. data/spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml +73 -0
  98. data/spec/fixtures/vcr_cassettes/resources/event/all.yml +490 -166
  99. data/spec/fixtures/vcr_cassettes/resources/installment/all.yml +418 -52
  100. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml +41 -52
  101. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml +36 -48
  102. data/spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml +48 -53
  103. data/spec/fixtures/vcr_cassettes/resources/installment/find.yml +44 -52
  104. data/spec/fixtures/vcr_cassettes/resources/remittance/all.yml +53 -33
  105. data/spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml +73 -0
  106. data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +34 -22
  107. data/spec/fixtures/vcr_cassettes/resources/web_hook/all.yml +42 -33
  108. data/spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml +1232 -54
  109. data/spec/spec_helper.rb +3 -20
  110. data/spec/support/stub_env.rb +7 -0
  111. data/spec/support/vcr.rb +3 -4
  112. metadata +190 -82
  113. data/.coveralls.yml +0 -2
  114. data/.gitignore +0 -19
  115. data/.ruby-gemset +0 -1
  116. data/.ruby-version +0 -1
  117. data/.travis.yml +0 -11
  118. data/Gemfile +0 -4
  119. data/Rakefile +0 -6
  120. data/boletosimples.gemspec +0 -37
  121. data/lib/boletosimples/extra.rb +0 -8
  122. data/lib/boletosimples/resources/partner/user.rb +0 -7
  123. data/lib/oauth2_patch.rb +0 -24
  124. data/spec/boletosimples/extra_spec.rb +0 -31
  125. data/spec/boletosimples/resources/partner/user_spec.rb +0 -19
  126. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml +0 -64
  127. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml +0 -56
  128. data/spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml +0 -58
  129. data/spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml +0 -54
  130. data/spec/fixtures/vcr_cassettes/last_request/userinfo.yml +0 -58
  131. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml +0 -118
  132. data/spec/fixtures/vcr_cassettes/resources/partner/user/create.yml +0 -60
  133. data/spec/spec.opts +0 -8
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customers
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
11
+ - email@minhaempresa.com.br
12
12
  Authorization:
13
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
+ Accept:
15
+ - application/json
14
16
  Accept-Encoding:
15
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
18
  response:
19
19
  status:
20
20
  code: 200
@@ -24,49 +24,96 @@ http_interactions:
24
24
  - Cowboy
25
25
  Connection:
26
26
  - keep-alive
27
- Strict-Transport-Security:
28
- - max-age=2592000
29
- Total:
30
- - '7'
27
+ X-Frame-Options:
28
+ - DENY
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Download-Options:
34
+ - noopen
35
+ X-Permitted-Cross-Domain-Policies:
36
+ - none
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Per-Page:
40
+ - '50'
41
+ Page:
42
+ - ''
31
43
  Content-Type:
32
44
  - application/json; charset=utf-8
33
45
  X-Ratelimit-Limit:
34
- - '500'
46
+ - '60'
35
47
  X-Ratelimit-Remaining:
36
- - '454'
48
+ - '32'
37
49
  Etag:
38
- - W/"11587a934bf44302614d1baa9fd3af13"
50
+ - W/"667a693af60595f15bccf9f8562b85cd"
39
51
  Cache-Control:
40
52
  - must-revalidate, private, max-age=0
41
53
  X-Request-Id:
42
- - b96cbb79-dfc0-4591-99ee-5d10f11d37b8
54
+ - 45f986c4-9cd6-4a4c-a891-89f48e51565f
43
55
  X-Runtime:
44
- - '0.044722'
56
+ - '0.033612'
45
57
  Date:
46
- - Sun, 08 Mar 2015 19:59:22 GMT
58
+ - Tue, 13 Apr 2021 17:19:10 GMT
47
59
  X-Rack-Cache:
48
60
  - miss
61
+ Strict-Transport-Security:
62
+ - max-age=2629746
49
63
  Vary:
50
- - Accept-Encoding
64
+ - Origin,Accept-Encoding
51
65
  Transfer-Encoding:
52
66
  - chunked
53
67
  Via:
54
68
  - 1.1 vegur
55
69
  body:
56
70
  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@example.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@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
- 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@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
- 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@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
- 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@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
- 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
71
+ string: '[{"id":80702,"city_name":"Rio de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua
72
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"811.536.151-85","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
73
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80703,"city_name":"Rio
74
+ de Janeiro","person_name":"Joao da Silva","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
75
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"18.033.842/0001-05","email":"cliente@example.com","neighborhood":"Sao
76
+ Francisco","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
77
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80706,"city_name":"Rio
78
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
79
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"02.854.339/0001-80","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
80
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80707,"city_name":"Rio
81
+ de Janeiro","person_name":"Joao da Silva","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
82
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"34.565.715/0001-03","email":"cliente@example.com","neighborhood":"Sao
83
+ Francisco","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
84
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80767,"city_name":"Rio
85
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
86
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"48.350.663/0001-62","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
87
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80809,"city_name":"Rio
88
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
89
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"75.587.633/0001-47","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
90
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80810,"city_name":"Rio
91
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
92
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"61.711.627/0001-45","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
93
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80811,"city_name":"Rio
94
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
95
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"12.120.044/0001-34","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
96
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80812,"city_name":"Rio
97
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
98
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"79.270.635/0001-69","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
99
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80816,"city_name":"Rio
100
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
101
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"73.197.200/0001-50","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
102
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80818,"city_name":"Rio
103
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
104
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"64.186.371/0001-92","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
105
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80820,"city_name":"Rio
106
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
107
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"20.341.932/0001-05","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
108
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80821,"city_name":"Rio
109
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
110
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"74.286.849/0001-00","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
111
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80822,"city_name":"Rio
112
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
113
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"01.588.073/0001-09","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
114
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null},{"id":80825,"city_name":"Rio
115
+ de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua quinhentos","address_complement":"Sala
116
+ 4","address_number":"111","mobile_number":null,"cnpj_cpf":"54.872.822/0001-91","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
117
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null}]'
118
+ recorded_at: Tue, 13 Apr 2021 17:19:10 GMT
119
+ recorded_with: VCR 6.0.0
@@ -2,21 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customers
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"customer":{"person_name":""}}'
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
11
+ - email@minhaempresa.com.br
12
12
  Authorization:
13
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
14
  Content-Type:
15
15
  - application/json
16
+ Accept:
17
+ - application/json
16
18
  Accept-Encoding:
17
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
20
  response:
21
21
  status:
22
22
  code: 422
@@ -26,26 +26,38 @@ http_interactions:
26
26
  - Cowboy
27
27
  Connection:
28
28
  - keep-alive
29
- Strict-Transport-Security:
30
- - max-age=2592000
29
+ X-Frame-Options:
30
+ - DENY
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Download-Options:
36
+ - noopen
37
+ X-Permitted-Cross-Domain-Policies:
38
+ - none
39
+ Referrer-Policy:
40
+ - strict-origin-when-cross-origin
31
41
  Content-Type:
32
42
  - application/json; charset=utf-8
33
43
  X-Ratelimit-Limit:
34
- - '500'
44
+ - '1000'
35
45
  X-Ratelimit-Remaining:
36
- - '455'
46
+ - '972'
37
47
  Cache-Control:
38
48
  - no-cache
39
49
  X-Request-Id:
40
- - bdd0e8f4-4742-4b6f-87af-abd3c192ee33
50
+ - b9e6e5c7-8f5b-41ee-94fa-6ec5bc1c15e5
41
51
  X-Runtime:
42
- - '0.045134'
52
+ - '0.026849'
43
53
  Date:
44
- - Sun, 08 Mar 2015 19:59:21 GMT
54
+ - Tue, 13 Apr 2021 17:19:11 GMT
45
55
  X-Rack-Cache:
46
56
  - invalidate, pass
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
47
59
  Vary:
48
- - Accept-Encoding
60
+ - Origin,Accept-Encoding
49
61
  Transfer-Encoding:
50
62
  - chunked
51
63
  Via:
@@ -53,7 +65,8 @@ http_interactions:
53
65
  body:
54
66
  encoding: UTF-8
55
67
  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
68
+ pode ficar em branco"],"zipcode":["não pode ficar em branco"],"address":["não
69
+ pode ficar em branco"],"neighborhood":["não pode ficar em branco"],"city_name":["não
70
+ pode ficar em branco"],"state":["não está incluído na lista"]}}'
71
+ recorded_at: Tue, 13 Apr 2021 17:19:11 GMT
72
+ recorded_with: VCR 6.0.0
@@ -2,21 +2,21 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://sandbox.boletosimples.com.br/api/v1/customers?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customers
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"customer":{}}'
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
11
+ - email@minhaempresa.com.br
12
12
  Authorization:
13
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
14
  Content-Type:
15
15
  - application/json
16
+ Accept:
17
+ - application/json
16
18
  Accept-Encoding:
17
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
20
  response:
21
21
  status:
22
22
  code: 422
@@ -26,33 +26,44 @@ http_interactions:
26
26
  - Cowboy
27
27
  Connection:
28
28
  - keep-alive
29
- Strict-Transport-Security:
30
- - max-age=2592000
29
+ X-Frame-Options:
30
+ - DENY
31
+ X-Xss-Protection:
32
+ - 1; mode=block
33
+ X-Content-Type-Options:
34
+ - nosniff
35
+ X-Download-Options:
36
+ - noopen
37
+ X-Permitted-Cross-Domain-Policies:
38
+ - none
39
+ Referrer-Policy:
40
+ - strict-origin-when-cross-origin
31
41
  Content-Type:
32
42
  - application/json; charset=utf-8
33
43
  X-Ratelimit-Limit:
34
- - '500'
44
+ - '1000'
35
45
  X-Ratelimit-Remaining:
36
- - '456'
46
+ - '971'
37
47
  Cache-Control:
38
48
  - no-cache
39
49
  X-Request-Id:
40
- - 1119bf7c-038c-4c5a-a2c2-e5c5c66097fd
50
+ - 11cbaf30-2b23-4517-a48e-f38050c17f17
41
51
  X-Runtime:
42
- - '0.119195'
52
+ - '0.017993'
43
53
  Date:
44
- - Sun, 08 Mar 2015 19:59:20 GMT
54
+ - Tue, 13 Apr 2021 17:19:12 GMT
45
55
  X-Rack-Cache:
46
56
  - invalidate, pass
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
47
59
  Vary:
48
- - Accept-Encoding
60
+ - Origin,Accept-Encoding
49
61
  Transfer-Encoding:
50
62
  - chunked
51
63
  Via:
52
64
  - 1.1 vegur
53
65
  body:
54
66
  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
67
+ string: '{"errors":[{"title":"customer não pode ficar em branco","status":422,"code":422}]}'
68
+ recorded_at: Tue, 13 Apr 2021 17:19:12 GMT
69
+ recorded_with: VCR 6.0.0
@@ -2,23 +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=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customers
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"customer":{"person_name":"Maria José","cnpj_cpf":"811.536.151-85","email":"cliente@example.com","address":"Rua
8
+ string: '{"customer":{"person_name":"Maria José","cnpj_cpf":"54.872.822/0001-91","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:
12
12
  User-Agent:
13
- - BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
13
+ - email@minhaempresa.com.br
14
14
  Authorization:
15
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
15
+ - Bearer BOLETOSIMPLES_API_TOKEN
16
16
  Content-Type:
17
17
  - application/json
18
+ Accept:
19
+ - application/json
18
20
  Accept-Encoding:
19
21
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
- Accept:
21
- - "*/*"
22
22
  response:
23
23
  status:
24
24
  code: 201
@@ -28,38 +28,50 @@ http_interactions:
28
28
  - Cowboy
29
29
  Connection:
30
30
  - keep-alive
31
- Strict-Transport-Security:
32
- - max-age=2592000
31
+ X-Frame-Options:
32
+ - DENY
33
+ X-Xss-Protection:
34
+ - 1; mode=block
35
+ X-Content-Type-Options:
36
+ - nosniff
37
+ X-Download-Options:
38
+ - noopen
39
+ X-Permitted-Cross-Domain-Policies:
40
+ - none
41
+ Referrer-Policy:
42
+ - strict-origin-when-cross-origin
33
43
  Location:
34
- - https://sandbox.boletosimples.com.br/api/v1/customers/65
44
+ - https://sandbox.boletosimples.com.br/api/v1/customers/80825
35
45
  Content-Type:
36
46
  - application/json; charset=utf-8
37
47
  X-Ratelimit-Limit:
38
- - '500'
48
+ - '1000'
39
49
  X-Ratelimit-Remaining:
40
- - '458'
50
+ - '973'
41
51
  Etag:
42
- - W/"f198f003d0efa5f1e98adab6fe1a196f"
52
+ - W/"bf421a7739e6fb5b4a0a6574f14546dc"
43
53
  Cache-Control:
44
54
  - max-age=0, private, must-revalidate
45
55
  X-Request-Id:
46
- - 12c35d9a-04c8-4f17-8d0a-641af68a6284
56
+ - bb3b5ce6-4428-40df-a4b7-1fa6bcf98aec
47
57
  X-Runtime:
48
- - '0.109969'
58
+ - '0.069261'
49
59
  Date:
50
- - Sun, 08 Mar 2015 19:59:18 GMT
60
+ - Tue, 13 Apr 2021 17:19:09 GMT
51
61
  X-Rack-Cache:
52
62
  - invalidate, pass
63
+ Strict-Transport-Security:
64
+ - max-age=2629746
53
65
  Vary:
54
- - Accept-Encoding
66
+ - Origin,Accept-Encoding
55
67
  Transfer-Encoding:
56
68
  - chunked
57
69
  Via:
58
70
  - 1.1 vegur
59
71
  body:
60
72
  encoding: UTF-8
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@example.com","neighborhood":"bairro","person_type":"individual","phone_number":"2112123434","zipcode":"12312-123","mobile_local_code":null,"state":"RJ","created_via_api":true}'
63
- http_version:
64
- recorded_at: Sun, 08 Mar 2015 19:59:17 GMT
65
- recorded_with: VCR 2.9.3
73
+ string: '{"id":80825,"city_name":"Rio de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua
74
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"54.872.822/0001-91","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
75
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null}'
76
+ recorded_at: Tue, 13 Apr 2021 17:19:09 GMT
77
+ recorded_with: VCR 6.0.0
@@ -2,19 +2,19 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/customers/65?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customers/80825
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.1.0 (contato@boletosimples.com.br)
11
+ - email@minhaempresa.com.br
12
12
  Authorization:
13
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
+ Accept:
15
+ - application/json
14
16
  Accept-Encoding:
15
17
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
- Accept:
17
- - "*/*"
18
18
  response:
19
19
  status:
20
20
  code: 200
@@ -24,36 +24,50 @@ http_interactions:
24
24
  - Cowboy
25
25
  Connection:
26
26
  - keep-alive
27
- Strict-Transport-Security:
28
- - max-age=2592000
27
+ X-Frame-Options:
28
+ - DENY
29
+ X-Xss-Protection:
30
+ - 1; mode=block
31
+ X-Content-Type-Options:
32
+ - nosniff
33
+ X-Download-Options:
34
+ - noopen
35
+ X-Permitted-Cross-Domain-Policies:
36
+ - none
37
+ Referrer-Policy:
38
+ - strict-origin-when-cross-origin
39
+ Location:
40
+ - https://sandbox.boletosimples.com.br/api/v1/customers/80825
29
41
  Content-Type:
30
42
  - application/json; charset=utf-8
31
43
  X-Ratelimit-Limit:
32
- - '500'
44
+ - '60'
33
45
  X-Ratelimit-Remaining:
34
- - '457'
46
+ - '33'
35
47
  Etag:
36
- - W/"f198f003d0efa5f1e98adab6fe1a196f"
48
+ - W/"bf421a7739e6fb5b4a0a6574f14546dc"
37
49
  Cache-Control:
38
50
  - must-revalidate, private, max-age=0
39
51
  X-Request-Id:
40
- - c9e2002f-00e7-42b3-840e-2c29874fcc20
52
+ - 63ba0393-f0c9-4be2-82b6-f954656cdee5
41
53
  X-Runtime:
42
- - '0.087909'
54
+ - '0.031891'
43
55
  Date:
44
- - Sun, 08 Mar 2015 19:59:19 GMT
56
+ - Tue, 13 Apr 2021 17:19:10 GMT
45
57
  X-Rack-Cache:
46
58
  - miss
59
+ Strict-Transport-Security:
60
+ - max-age=2629746
47
61
  Vary:
48
- - Accept-Encoding
62
+ - Origin,Accept-Encoding
49
63
  Transfer-Encoding:
50
64
  - chunked
51
65
  Via:
52
66
  - 1.1 vegur
53
67
  body:
54
68
  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@example.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
69
+ string: '{"id":80825,"city_name":"Rio de Janeiro","person_name":"Maria José","nickname":null,"address":"Rua
70
+ quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"54.872.822/0001-91","email":"cliente@example.com","neighborhood":"bairro","phone_number":"2112123434","zipcode":"12312123","mobile_local_code":null,"notes":null,"state":"RJ","created_via_api":true,"email_cc":null,"contact_person":null,"truncated_address":"Rua
71
+ quinhentos, 111","external_code":null,"tags":[],"tag_list":"","custom_data":null}'
72
+ recorded_at: Tue, 13 Apr 2021 17:19:10 GMT
73
+ recorded_with: VCR 6.0.0