boletosimples 0.6.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (136) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ruby.yml +34 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +9 -0
  5. data/.ruby-version +1 -1
  6. data/CHANGELOG.md +6 -20
  7. data/Gemfile +2 -0
  8. data/README.md +12 -54
  9. data/Rakefile +3 -1
  10. data/boletosimples.gemspec +14 -11
  11. data/lib/boletosimples.rb +4 -6
  12. data/lib/boletosimples/configuration.rb +14 -25
  13. data/lib/boletosimples/last_request.rb +12 -9
  14. data/lib/boletosimples/middlewares/bearer.rb +12 -0
  15. data/lib/boletosimples/middlewares/last_request.rb +3 -1
  16. data/lib/boletosimples/middlewares/raise_error.rb +9 -2
  17. data/lib/boletosimples/middlewares/user_agent.rb +3 -1
  18. data/lib/boletosimples/resources/bank_billet.rb +5 -11
  19. data/lib/boletosimples/resources/bank_billet_account.rb +3 -1
  20. data/lib/boletosimples/resources/bank_billet_discharge.rb +3 -1
  21. data/lib/boletosimples/resources/bank_billet_payment.rb +3 -1
  22. data/lib/boletosimples/resources/bank_billet_remittance.rb +3 -1
  23. data/lib/boletosimples/resources/base_model.rb +3 -1
  24. data/lib/boletosimples/resources/customer.rb +3 -1
  25. data/lib/boletosimples/resources/customer_import.rb +5 -3
  26. data/lib/boletosimples/resources/customer_subscription.rb +3 -10
  27. data/lib/boletosimples/resources/customer_subscription_import.rb +5 -3
  28. data/lib/boletosimples/resources/discharge.rb +4 -11
  29. data/lib/boletosimples/resources/email_delivery.rb +3 -1
  30. data/lib/boletosimples/resources/event.rb +3 -1
  31. data/lib/boletosimples/resources/installment.rb +3 -1
  32. data/lib/boletosimples/resources/remittance.rb +3 -1
  33. data/lib/boletosimples/resources/sms_delivery.rb +6 -0
  34. data/lib/boletosimples/resources/transaction.rb +3 -1
  35. data/lib/boletosimples/resources/webhook.rb +3 -1
  36. data/lib/boletosimples/resources/webhook_delivery.rb +3 -1
  37. data/lib/boletosimples/response_error.rb +8 -3
  38. data/lib/boletosimples/version.rb +3 -1
  39. data/spec/boletosimples/configuration_spec.rb +71 -101
  40. data/spec/boletosimples/last_request_spec.rb +16 -28
  41. data/spec/boletosimples/resources/bank_billet_account_spec.rb +57 -33
  42. data/spec/boletosimples/resources/bank_billet_discharge_spec.rb +7 -12
  43. data/spec/boletosimples/resources/bank_billet_payment_spec.rb +7 -12
  44. data/spec/boletosimples/resources/bank_billet_remittance_spec.rb +7 -12
  45. data/spec/boletosimples/resources/bank_billet_spec.rb +56 -42
  46. data/spec/boletosimples/resources/customer_import_spec.rb +41 -30
  47. data/spec/boletosimples/resources/customer_spec.rb +52 -39
  48. data/spec/boletosimples/resources/customer_subscription_import_spec.rb +41 -30
  49. data/spec/boletosimples/resources/customer_subscription_spec.rb +61 -33
  50. data/spec/boletosimples/resources/discharge_spec.rb +64 -11
  51. data/spec/boletosimples/resources/email_delivery_spec.rb +6 -11
  52. data/spec/boletosimples/resources/event_spec.rb +7 -12
  53. data/spec/boletosimples/resources/installment_spec.rb +61 -32
  54. data/spec/boletosimples/resources/remittance_spec.rb +7 -12
  55. data/spec/boletosimples/resources/sms_delivery_spec.rb +12 -0
  56. data/spec/boletosimples/resources/transactions_spec.rb +7 -12
  57. data/spec/boletosimples/resources/webhook_delivery_spec.rb +7 -12
  58. data/spec/boletosimples/resources/webhook_spec.rb +7 -12
  59. data/spec/fixtures/discharge.RET +3 -0
  60. data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +536 -88
  61. data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +537 -91
  62. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml +34 -92
  63. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +32 -20
  64. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml +28 -17
  65. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml +43 -27
  66. data/spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml +83 -0
  67. data/spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml +51 -27
  68. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml +131 -20
  69. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml +34 -20
  70. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml +30 -19
  71. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml +41 -21
  72. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml +38 -18
  73. data/spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml +66 -47
  74. data/spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml +44 -42
  75. data/spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml +95 -48
  76. data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +79 -32
  77. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +30 -17
  78. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +28 -17
  79. data/spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml +33 -21
  80. data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +33 -19
  81. data/spec/fixtures/vcr_cassettes/resources/customer_import/all.yml +43 -60
  82. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml +37 -51
  83. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml +38 -52
  84. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml +43 -68
  85. data/spec/fixtures/vcr_cassettes/resources/customer_import/find.yml +40 -54
  86. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml +102 -52
  87. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml +40 -50
  88. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml +36 -48
  89. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml +48 -53
  90. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml +44 -50
  91. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml +45 -133
  92. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml +44 -55
  93. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml +37 -52
  94. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml +39 -53
  95. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml +43 -70
  96. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml +40 -55
  97. data/spec/fixtures/vcr_cassettes/resources/discharge/all.yml +64 -33
  98. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml +70 -0
  99. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml +69 -0
  100. data/spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml +84 -0
  101. data/spec/fixtures/vcr_cassettes/resources/discharge/find.yml +71 -0
  102. data/spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml +40 -43
  103. data/spec/fixtures/vcr_cassettes/resources/event/all.yml +490 -166
  104. data/spec/fixtures/vcr_cassettes/resources/installment/all.yml +418 -52
  105. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml +41 -52
  106. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml +36 -48
  107. data/spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml +48 -53
  108. data/spec/fixtures/vcr_cassettes/resources/installment/find.yml +44 -52
  109. data/spec/fixtures/vcr_cassettes/resources/remittance/all.yml +53 -33
  110. data/spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml +73 -0
  111. data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +34 -22
  112. data/spec/fixtures/vcr_cassettes/resources/web_hook/all.yml +42 -33
  113. data/spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml +1232 -54
  114. data/spec/spec_helper.rb +3 -20
  115. data/spec/support/stub_env.rb +7 -0
  116. data/spec/support/vcr.rb +3 -4
  117. metadata +87 -52
  118. data/.coveralls.yml +0 -2
  119. data/.travis.yml +0 -46
  120. data/gemfiles/rails_42.gemfile +0 -8
  121. data/gemfiles/rails_50.gemfile +0 -8
  122. data/gemfiles/rails_51.gemfile +0 -8
  123. data/gemfiles/rails_52.gemfile +0 -9
  124. data/lib/boletosimples/extra.rb +0 -8
  125. data/lib/boletosimples/resources/partner/user.rb +0 -7
  126. data/lib/oauth2_patch.rb +0 -24
  127. data/spec/boletosimples/extra_spec.rb +0 -31
  128. data/spec/boletosimples/resources/partner/user_spec.rb +0 -19
  129. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml +0 -64
  130. data/spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml +0 -56
  131. data/spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml +0 -58
  132. data/spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml +0 -54
  133. data/spec/fixtures/vcr_cassettes/last_request/userinfo.yml +0 -58
  134. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml +0 -118
  135. data/spec/fixtures/vcr_cassettes/resources/partner/user/create.yml +0 -60
  136. data/spec/spec.opts +0 -8
@@ -2,84 +2,73 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://sandbox.boletosimples.com.br/api/v1/installments?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/installments
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"installment":{"person_name":""}}'
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.3.1 (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
23
23
  message: Unprocessable Entity
24
24
  headers:
25
+ Server:
26
+ - Cowboy
25
27
  Connection:
26
28
  - keep-alive
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
27
41
  Content-Type:
28
42
  - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Status:
32
- - 422 Unprocessable Entity
33
- Cache-Control:
34
- - no-cache
35
43
  X-Ratelimit-Limit:
36
- - '500'
37
- Date:
38
- - Mon, 15 Aug 2016 19:16:32 GMT
39
- Strict-Transport-Security:
40
- - max-age=631138519
44
+ - '1000'
41
45
  X-Ratelimit-Remaining:
42
- - '491'
43
- Vary:
44
- - Accept-Encoding
45
- X-Permitted-Cross-Domain-Policies:
46
- - none
47
- X-Xss-Protection:
48
- - 1; mode=block
46
+ - '985'
47
+ Cache-Control:
48
+ - no-cache
49
49
  X-Request-Id:
50
- - edf6487b-5002-439a-9b84-2f7a1643a36e
51
- Content-Security-Policy-Report-Only:
52
- - 'default-src ''self''; child-src ''self'' www.googleadservices.com googleads.g.doubleclick.net
53
- www.google.com; connect-src ws: wss: *.intercom.io ws.pusherapp.com hn.inspectlet.com
54
- stats.pusher.com; font-src ''self'' fonts.googleapis.com fonts.gstatic.com
55
- data:; img-src ''self'' https: data:; script-src ''self'' static.intercomcdn.com
56
- cdn.inspectlet.com widget.intercom.io js.intercomcdn.com js.pusher.com stats.pusher.com
57
- zapier.com www.google-analytics.com www.googleadservices.com i.kissmetrics.com
58
- doug1izaerwt3.cloudfront.net app.popupdomination.com cdn.ywxi.net www.draw.io;
59
- style-src ''self'' fonts.googleapis.com; report-uri https://boletosimples.report-uri.io/r/default/csp/reportOnly'
60
- X-Download-Options:
61
- - noopen
50
+ - 93706d41-4909-4afd-bf90-47b3638ac7fa
62
51
  X-Runtime:
63
- - '0.025894'
64
- X-Frame-Options:
65
- - sameorigin
66
- X-Content-Type-Options:
67
- - nosniff
52
+ - '0.074107'
53
+ Date:
54
+ - Tue, 13 Apr 2021 17:18:44 GMT
68
55
  X-Rack-Cache:
69
56
  - invalidate, pass
70
- X-Powered-By:
71
- - Phusion Passenger 5.0.30
72
- Server:
73
- - nginx/1.10.1 + Phusion Passenger 5.0.30
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
59
+ Vary:
60
+ - Origin,Accept-Encoding
61
+ Transfer-Encoding:
62
+ - chunked
74
63
  Via:
75
64
  - 1.1 vegur
76
65
  body:
77
66
  encoding: UTF-8
78
- string: '{"errors":{"customer":["não pode ficar em branco"],"bank_billet_account":["não
79
- pode ficar em branco"],"cycle":["não pode ficar em branco","não está incluído
80
- na lista"],"total":["não pode ficar em branco"],"start_at":["não pode ficar
81
- em branco"],"description":["não pode ficar em branco"],"amount":["deve ser
82
- maior que 0"]}}'
83
- http_version:
84
- recorded_at: Mon, 15 Aug 2016 19:16:32 GMT
85
- recorded_with: VCR 2.9.3
67
+ string: '{"errors":{"customer_person_name":["não pode ficar em branco"],"customer_cnpj_cpf":["não
68
+ pode ficar em branco"],"customer_zipcode":["não pode ficar em branco"],"total":["não
69
+ pode ficar em branco","não é um número"],"start_at":["não pode ficar em branco"],"amount":["não
70
+ pode ficar em branco"],"customer_address":["não pode ficar em branco"],"customer_neighborhood":["não
71
+ pode ficar em branco"],"customer_city_name":["não pode ficar em branco"],"customer_state":["não
72
+ está incluído na lista"]}}'
73
+ recorded_at: Tue, 13 Apr 2021 17:18:44 GMT
74
+ recorded_with: VCR 6.0.0
@@ -2,80 +2,68 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://sandbox.boletosimples.com.br/api/v1/installments?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/installments
6
6
  body:
7
7
  encoding: UTF-8
8
8
  string: '{"installment":{}}'
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.3.1 (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
23
23
  message: Unprocessable Entity
24
24
  headers:
25
+ Server:
26
+ - Cowboy
25
27
  Connection:
26
28
  - keep-alive
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
27
41
  Content-Type:
28
42
  - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Status:
32
- - 422 Unprocessable Entity
33
- Cache-Control:
34
- - no-cache
35
43
  X-Ratelimit-Limit:
36
- - '500'
37
- Date:
38
- - Mon, 15 Aug 2016 19:16:31 GMT
39
- Strict-Transport-Security:
40
- - max-age=631138519
44
+ - '1000'
41
45
  X-Ratelimit-Remaining:
42
- - '492'
43
- Vary:
44
- - Accept-Encoding
45
- X-Permitted-Cross-Domain-Policies:
46
- - none
47
- X-Xss-Protection:
48
- - 1; mode=block
46
+ - '984'
47
+ Cache-Control:
48
+ - no-cache
49
49
  X-Request-Id:
50
- - 464aab27-7141-4e9a-94fd-38b97ca51a7d
51
- Content-Security-Policy-Report-Only:
52
- - 'default-src ''self''; child-src ''self'' www.googleadservices.com googleads.g.doubleclick.net
53
- www.google.com; connect-src ws: wss: *.intercom.io ws.pusherapp.com hn.inspectlet.com
54
- stats.pusher.com; font-src ''self'' fonts.googleapis.com fonts.gstatic.com
55
- data:; img-src ''self'' https: data:; script-src ''self'' static.intercomcdn.com
56
- cdn.inspectlet.com widget.intercom.io js.intercomcdn.com js.pusher.com stats.pusher.com
57
- zapier.com www.google-analytics.com www.googleadservices.com i.kissmetrics.com
58
- doug1izaerwt3.cloudfront.net app.popupdomination.com cdn.ywxi.net www.draw.io;
59
- style-src ''self'' fonts.googleapis.com; report-uri https://boletosimples.report-uri.io/r/default/csp/reportOnly'
60
- X-Download-Options:
61
- - noopen
50
+ - b79be165-5970-4b8a-8c9f-08ee89e9d173
62
51
  X-Runtime:
63
- - '0.018220'
64
- X-Frame-Options:
65
- - sameorigin
66
- X-Content-Type-Options:
67
- - nosniff
52
+ - '0.023672'
53
+ Date:
54
+ - Tue, 13 Apr 2021 17:18:45 GMT
68
55
  X-Rack-Cache:
69
56
  - invalidate, pass
70
- X-Powered-By:
71
- - Phusion Passenger 5.0.30
72
- Server:
73
- - nginx/1.10.1 + Phusion Passenger 5.0.30
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
59
+ Vary:
60
+ - Origin,Accept-Encoding
61
+ Transfer-Encoding:
62
+ - chunked
74
63
  Via:
75
64
  - 1.1 vegur
76
65
  body:
77
66
  encoding: UTF-8
78
- string: '{"errors":{"installment":["não pode ficar em branco"]}}'
79
- http_version:
80
- recorded_at: Mon, 15 Aug 2016 19:16:31 GMT
81
- recorded_with: VCR 2.9.3
67
+ string: '{"errors":[{"title":"installment não pode ficar em branco","status":422,"code":422}]}'
68
+ recorded_at: Tue, 13 Apr 2021 17:18:45 GMT
69
+ recorded_with: VCR 6.0.0
@@ -2,84 +2,79 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://sandbox.boletosimples.com.br/api/v1/installments?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/installments
6
6
  body:
7
7
  encoding: UTF-8
8
- string: '{"installment":{"customer_id":"11","bank_billet_account_id":"12","amount":"1.120,4","cycle":"monthly","start_at":"2016-09-15","total":"3","description":"Hospedagem"}}'
8
+ string: '{"installment":{"amount":"1.120,4","cycle":"monthly","start_at":"2022-09-15","total":"3","description":"Hospedagem","customer_address":"Rua
9
+ quinhentos","customer_address_complement":"Sala 4","customer_address_number":"111","customer_city_name":"Rio
10
+ de Janeiro","customer_cnpj_cpf":"18.033.842/0001-05","customer_email":"cliente@example.com","customer_neighborhood":"Sao
11
+ Francisco","customer_person_name":"Joao da Silva","customer_person_type":"individual","customer_phone_number":"2112123434","customer_state":"RJ","customer_zipcode":"12312-123"}}'
9
12
  headers:
10
13
  User-Agent:
11
- - BoletoSimples Ruby Client v0.3.1 (contato@boletosimples.com.br)
14
+ - email@minhaempresa.com.br
12
15
  Authorization:
13
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
16
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
17
  Content-Type:
15
18
  - application/json
19
+ Accept:
20
+ - application/json
16
21
  Accept-Encoding:
17
22
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- Accept:
19
- - "*/*"
20
23
  response:
21
24
  status:
22
25
  code: 201
23
26
  message: Created
24
27
  headers:
28
+ Server:
29
+ - Cowboy
25
30
  Connection:
26
31
  - keep-alive
27
- Content-Type:
28
- - application/json; charset=utf-8
29
- Transfer-Encoding:
30
- - chunked
31
- Status:
32
- - 201 Created
33
- Cache-Control:
34
- - max-age=0, private, must-revalidate
35
- X-Ratelimit-Limit:
36
- - '500'
37
- Date:
38
- - Mon, 15 Aug 2016 19:16:30 GMT
39
- Strict-Transport-Security:
40
- - max-age=631138519
41
- X-Ratelimit-Remaining:
42
- - '493'
43
- Vary:
44
- - Accept-Encoding
45
- X-Permitted-Cross-Domain-Policies:
46
- - none
32
+ X-Frame-Options:
33
+ - DENY
47
34
  X-Xss-Protection:
48
35
  - 1; mode=block
49
- X-Request-Id:
50
- - 394821c4-efee-4d1f-a06a-bccc9edbd4e4
51
- Content-Security-Policy-Report-Only:
52
- - 'default-src ''self''; child-src ''self'' www.googleadservices.com googleads.g.doubleclick.net
53
- www.google.com; connect-src ws: wss: *.intercom.io ws.pusherapp.com hn.inspectlet.com
54
- stats.pusher.com; font-src ''self'' fonts.googleapis.com fonts.gstatic.com
55
- data:; img-src ''self'' https: data:; script-src ''self'' static.intercomcdn.com
56
- cdn.inspectlet.com widget.intercom.io js.intercomcdn.com js.pusher.com stats.pusher.com
57
- zapier.com www.google-analytics.com www.googleadservices.com i.kissmetrics.com
58
- doug1izaerwt3.cloudfront.net app.popupdomination.com cdn.ywxi.net www.draw.io;
59
- style-src ''self'' fonts.googleapis.com; report-uri https://boletosimples.report-uri.io/r/default/csp/reportOnly'
60
- Location:
61
- - https://sandbox.boletosimples.com.br/api/v1/installments/2
36
+ X-Content-Type-Options:
37
+ - nosniff
62
38
  X-Download-Options:
63
39
  - noopen
40
+ X-Permitted-Cross-Domain-Policies:
41
+ - none
42
+ Referrer-Policy:
43
+ - strict-origin-when-cross-origin
44
+ Location:
45
+ - https://sandbox.boletosimples.com.br/api/v1/installments/12421
46
+ Content-Type:
47
+ - application/json; charset=utf-8
48
+ X-Ratelimit-Limit:
49
+ - '1000'
50
+ X-Ratelimit-Remaining:
51
+ - '986'
64
52
  Etag:
65
- - W/"ff834c39ca2ba0ac0941d7fbde7ac5c5"
53
+ - W/"4b998210f081f4a1318ce41309d3bae7"
54
+ Cache-Control:
55
+ - max-age=0, private, must-revalidate
56
+ X-Request-Id:
57
+ - 9de81dfb-a115-490d-bea3-98f13e9ed900
66
58
  X-Runtime:
67
- - '0.066803'
68
- X-Frame-Options:
69
- - sameorigin
70
- X-Content-Type-Options:
71
- - nosniff
59
+ - '0.112589'
60
+ Date:
61
+ - Tue, 13 Apr 2021 17:18:42 GMT
72
62
  X-Rack-Cache:
73
63
  - invalidate, pass
74
- X-Powered-By:
75
- - Phusion Passenger 5.0.30
76
- Server:
77
- - nginx/1.10.1 + Phusion Passenger 5.0.30
64
+ Strict-Transport-Security:
65
+ - max-age=2629746
66
+ Vary:
67
+ - Origin,Accept-Encoding
68
+ Transfer-Encoding:
69
+ - chunked
78
70
  Via:
79
71
  - 1.1 vegur
80
72
  body:
81
73
  encoding: UTF-8
82
- string: '{"id":2,"amount":1120.4,"cycle":"monthly","start_at":"2016-09-15","end_at":"2016-11-16","instructions":null,"customer_id":11,"description":"Hospedagem","created_at":"2016-08-15","updated_at":"2016-08-15","created_via_api":true,"total":3,"bank_billet_account_id":12,"status":"created"}'
83
- http_version:
84
- recorded_at: Mon, 15 Aug 2016 19:16:30 GMT
85
- recorded_with: VCR 2.9.3
74
+ string: '{"id":12421,"amount":1120.4,"cycle":"monthly","start_at":"2022-09-15","end_at":"2022-11-16","instructions":null,"customer_id":80703,"description":"Hospedagem","created_at":"2021-04-13T14:18:42-03:00","updated_at":"2021-04-13T14:18:42-03:00","customer_person_name":"Joao
75
+ da Silva","customer_cnpj_cpf":"18.033.842/0001-05","customer_address":"Rua
76
+ quinhentos","customer_state":"RJ","customer_neighborhood":"Sao Francisco","customer_zipcode":"12312123","customer_address_number":"111","customer_address_complement":"Sala
77
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","customer_city_name":"Rio
78
+ de Janeiro","customer_email_cc":null,"customer_ignore_email":null,"customer_mobile_local_code":null,"customer_mobile_number":null,"customer_nickname":null,"customer_notes":null,"created_via_api":true,"total":3,"bank_billet_account_id":3547,"status":"created","fine_for_delay":null,"fine_type":0,"fine_percentage":null,"fine_value":null,"days_for_fine":null,"late_payment_interest":null,"interest_type":0,"interest_daily_value":null,"interest_daily_percentage":null,"interest_monthly_percentage":null,"days_for_interest":null,"discount_type":0,"days_for_discount":null,"discount_value":null,"discount_percentage":null,"bank_billet_layout_id":null,"url":null,"bank_billet_ids":[],"bank_billets":[],"notes":null,"payment_count":1,"tags":[],"tag_list":"","prevent_registration":false,"divergent_payment_type":null,"divergent_payment_value_type":null,"divergent_payment_maximum_value":null,"divergent_payment_minimum_value":null,"divergent_payment_maximum_percentage":null,"divergent_payment_minimum_percentage":null,"divergent_payment_limit":null,"days_for_second_discount":null,"second_discount_percentage":null,"second_discount_value":null,"days_for_third_discount":null,"third_discount_percentage":null,"third_discount_value":null,"days_for_revoke":null,"days_for_sue":null,"days_for_negativation":null,"interest_percentage":null,"interest_value":null,"interest_days_type":0,"customer_contact_person":null,"custom_attachment_name":null,"guarantor_name":null,"guarantor_cnpj_cpf":null,"guarantor_address_number":null,"guarantor_neighborhood":null,"guarantor_phone_number":null,"guarantor_city_name":null,"guarantor_state":null,"guarantor_zipcode":null,"guarantor_address":null,"guarantor_address_complement":null,"document_number":null,"document_date":null}'
79
+ recorded_at: Tue, 13 Apr 2021 17:18:42 GMT
80
+ recorded_with: VCR 6.0.0
@@ -2,82 +2,74 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/installments/2?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/installments/12421
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
9
9
  headers:
10
10
  User-Agent:
11
- - BoletoSimples Ruby Client v0.3.1 (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
21
21
  message: OK
22
22
  headers:
23
+ Server:
24
+ - Cowboy
23
25
  Connection:
24
26
  - keep-alive
25
- Content-Type:
26
- - application/json; charset=utf-8
27
- Transfer-Encoding:
28
- - chunked
29
- Status:
30
- - 200 OK
31
- Cache-Control:
32
- - must-revalidate, private, max-age=0
33
- X-Ratelimit-Limit:
34
- - '500'
35
- Date:
36
- - Mon, 15 Aug 2016 19:16:34 GMT
37
- Strict-Transport-Security:
38
- - max-age=631138519
39
- X-Ratelimit-Remaining:
40
- - '489'
41
- Vary:
42
- - Accept-Encoding
43
- X-Permitted-Cross-Domain-Policies:
44
- - none
27
+ X-Frame-Options:
28
+ - DENY
45
29
  X-Xss-Protection:
46
30
  - 1; mode=block
47
- X-Request-Id:
48
- - 3cc93310-e19b-4b74-a395-a7a4a7e05ed4
49
- Content-Security-Policy-Report-Only:
50
- - 'default-src ''self''; child-src ''self'' www.googleadservices.com googleads.g.doubleclick.net
51
- www.google.com; connect-src ws: wss: *.intercom.io ws.pusherapp.com hn.inspectlet.com
52
- stats.pusher.com; font-src ''self'' fonts.googleapis.com fonts.gstatic.com
53
- data:; img-src ''self'' https: data:; script-src ''self'' static.intercomcdn.com
54
- cdn.inspectlet.com widget.intercom.io js.intercomcdn.com js.pusher.com stats.pusher.com
55
- zapier.com www.google-analytics.com www.googleadservices.com i.kissmetrics.com
56
- doug1izaerwt3.cloudfront.net app.popupdomination.com cdn.ywxi.net www.draw.io;
57
- style-src ''self'' fonts.googleapis.com; report-uri https://boletosimples.report-uri.io/r/default/csp/reportOnly'
58
- Location:
59
- - https://sandbox.boletosimples.com.br/api/v1/installments/2
31
+ X-Content-Type-Options:
32
+ - nosniff
60
33
  X-Download-Options:
61
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/installments/12421
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ X-Ratelimit-Limit:
44
+ - '60'
45
+ X-Ratelimit-Remaining:
46
+ - '45'
62
47
  Etag:
63
- - W/"296f143a826422c7fc46ecae2f461b5c"
48
+ - W/"4b998210f081f4a1318ce41309d3bae7"
49
+ Cache-Control:
50
+ - must-revalidate, private, max-age=0
51
+ X-Request-Id:
52
+ - 2075c3d3-5c32-4fa1-927d-764121d5d2a5
64
53
  X-Runtime:
65
- - '0.028511'
66
- X-Frame-Options:
67
- - sameorigin
68
- X-Content-Type-Options:
69
- - nosniff
54
+ - '0.038208'
55
+ Date:
56
+ - Tue, 13 Apr 2021 17:18:43 GMT
70
57
  X-Rack-Cache:
71
58
  - miss
72
- X-Powered-By:
73
- - Phusion Passenger 5.0.30
74
- Server:
75
- - nginx/1.10.1 + Phusion Passenger 5.0.30
59
+ Strict-Transport-Security:
60
+ - max-age=2629746
61
+ Vary:
62
+ - Origin,Accept-Encoding
63
+ Transfer-Encoding:
64
+ - chunked
76
65
  Via:
77
66
  - 1.1 vegur
78
67
  body:
79
68
  encoding: UTF-8
80
- string: '{"id":2,"amount":1120.4,"cycle":"monthly","start_at":"2016-09-15","end_at":"2016-11-16","instructions":null,"customer_id":11,"description":"Hospedagem","created_at":"2016-08-15","updated_at":"2016-08-15","created_via_api":true,"total":3,"bank_billet_account_id":12,"status":"processed"}'
81
- http_version:
82
- recorded_at: Mon, 15 Aug 2016 19:16:34 GMT
83
- recorded_with: VCR 2.9.3
69
+ string: '{"id":12421,"amount":1120.4,"cycle":"monthly","start_at":"2022-09-15","end_at":"2022-11-16","instructions":null,"customer_id":80703,"description":"Hospedagem","created_at":"2021-04-13T14:18:42-03:00","updated_at":"2021-04-13T14:18:42-03:00","customer_person_name":"Joao
70
+ da Silva","customer_cnpj_cpf":"18.033.842/0001-05","customer_address":"Rua
71
+ quinhentos","customer_state":"RJ","customer_neighborhood":"Sao Francisco","customer_zipcode":"12312123","customer_address_number":"111","customer_address_complement":"Sala
72
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","customer_city_name":"Rio
73
+ de Janeiro","customer_email_cc":null,"customer_ignore_email":null,"customer_mobile_local_code":null,"customer_mobile_number":null,"customer_nickname":null,"customer_notes":null,"created_via_api":true,"total":3,"bank_billet_account_id":3547,"status":"created","fine_for_delay":null,"fine_type":0,"fine_percentage":null,"fine_value":null,"days_for_fine":null,"late_payment_interest":null,"interest_type":0,"interest_daily_value":null,"interest_daily_percentage":null,"interest_monthly_percentage":null,"days_for_interest":null,"discount_type":0,"days_for_discount":null,"discount_value":null,"discount_percentage":null,"bank_billet_layout_id":null,"url":null,"bank_billet_ids":[],"bank_billets":[],"notes":null,"payment_count":1,"tags":[],"tag_list":"","prevent_registration":false,"divergent_payment_type":null,"divergent_payment_value_type":null,"divergent_payment_maximum_value":null,"divergent_payment_minimum_value":null,"divergent_payment_maximum_percentage":null,"divergent_payment_minimum_percentage":null,"divergent_payment_limit":null,"days_for_second_discount":null,"second_discount_percentage":null,"second_discount_value":null,"days_for_third_discount":null,"third_discount_percentage":null,"third_discount_value":null,"days_for_revoke":null,"days_for_sue":null,"days_for_negativation":null,"interest_percentage":null,"interest_value":null,"interest_days_type":0,"customer_contact_person":null,"custom_attachment_name":null,"guarantor_name":null,"guarantor_cnpj_cpf":null,"guarantor_address_number":null,"guarantor_neighborhood":null,"guarantor_phone_number":null,"guarantor_city_name":null,"guarantor_state":null,"guarantor_zipcode":null,"guarantor_address":null,"guarantor_address_complement":null,"document_number":null,"document_date":null}'
74
+ recorded_at: Tue, 13 Apr 2021 17:18:43 GMT
75
+ recorded_with: VCR 6.0.0