boletosimples 1.0.4 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +6 -0
  3. data/README.md +6 -7
  4. data/lib/boletosimples/configuration.rb +2 -2
  5. data/lib/boletosimples/response_error.rb +2 -2
  6. data/lib/boletosimples/version.rb +1 -1
  7. data/spec/boletosimples/configuration_spec.rb +3 -3
  8. data/spec/boletosimples/resources/bank_billet_spec.rb +2 -2
  9. data/spec/boletosimples/resources/customer_spec.rb +9 -4
  10. data/spec/boletosimples/resources/customer_subscription_spec.rb +1 -1
  11. data/spec/boletosimples/resources/installment_spec.rb +1 -1
  12. data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +386 -520
  13. data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +78 -522
  14. data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml +30 -12
  15. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +32 -16
  16. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml +31 -15
  17. data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml +42 -28
  18. data/spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml +41 -27
  19. data/spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml +46 -31
  20. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml +47 -103
  21. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml +31 -15
  22. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml +31 -15
  23. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml +35 -19
  24. data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml +35 -19
  25. data/spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml +35 -41
  26. data/spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml +73 -72
  27. data/spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml +39 -70
  28. data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +111 -56
  29. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +35 -19
  30. data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +35 -16
  31. data/spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml +37 -21
  32. data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +36 -20
  33. data/spec/fixtures/vcr_cassettes/resources/customer_import/all.yml +34 -18
  34. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml +31 -15
  35. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml +31 -15
  36. data/spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml +36 -20
  37. data/spec/fixtures/vcr_cassettes/resources/customer_import/find.yml +34 -18
  38. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml +35 -71
  39. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml +32 -16
  40. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml +31 -15
  41. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml +35 -19
  42. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml +36 -20
  43. data/spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml +36 -20
  44. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml +34 -19
  45. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml +31 -15
  46. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml +31 -15
  47. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml +36 -20
  48. data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml +34 -18
  49. data/spec/fixtures/vcr_cassettes/resources/discharge/all.yml +37 -39
  50. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml +31 -15
  51. data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml +31 -15
  52. data/spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml +37 -21
  53. data/spec/fixtures/vcr_cassettes/resources/discharge/find.yml +36 -18
  54. data/spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml +1 -1
  55. data/spec/fixtures/vcr_cassettes/resources/event/all.yml +267 -432
  56. data/spec/fixtures/vcr_cassettes/resources/installment/all.yml +71 -375
  57. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml +32 -16
  58. data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml +31 -15
  59. data/spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml +35 -19
  60. data/spec/fixtures/vcr_cassettes/resources/installment/find.yml +59 -19
  61. data/spec/fixtures/vcr_cassettes/resources/remittance/all.yml +82 -81
  62. data/spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml +31 -15
  63. data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +72 -71
  64. data/spec/fixtures/vcr_cassettes/resources/web_hook/all.yml +33 -17
  65. data/spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml +2657 -1206
  66. metadata +5 -186
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/sms_deliveries
5
+ uri: https://api-sandbox.kobana.com.br/v1/sms_deliveries
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -20,10 +20,14 @@ http_interactions:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
- Server:
24
- - Cowboy
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Transfer-Encoding:
26
+ - chunked
25
27
  Connection:
26
28
  - keep-alive
29
+ Server:
30
+ - Cowboy
27
31
  X-Frame-Options:
28
32
  - DENY
29
33
  X-Xss-Protection:
@@ -36,38 +40,50 @@ http_interactions:
36
40
  - none
37
41
  Referrer-Policy:
38
42
  - strict-origin-when-cross-origin
43
+ Expect-Ct:
44
+ - max-age=0, report-uri="https://boletosimples.report-uri.com/r/d/ct/reportOnly"
45
+ Cross-Origin-Resource-Policy:
46
+ - cross-origin
47
+ Cross-Origin-Embedder-Policy:
48
+ - unsafe-none
49
+ Cross-Origin-Opener-Policy:
50
+ - unsafe-none
39
51
  Per-Page:
40
52
  - '50'
41
53
  Page:
42
54
  - ''
43
- Content-Type:
44
- - application/json; charset=utf-8
45
55
  X-Ratelimit-Limit:
46
- - '60'
56
+ - '100'
47
57
  X-Ratelimit-Remaining:
48
- - '59'
58
+ - '65'
49
59
  Etag:
50
60
  - W/"4f53cda18c2baa0c0354bb5f9a3ecbe5"
51
61
  Cache-Control:
52
62
  - must-revalidate, private, max-age=0
53
63
  X-Request-Id:
54
- - 53c3e015-ffb8-415a-89c0-c3270a2f33d8
64
+ - cbec91a3-978d-42cb-b2bb-565f5590dc71
55
65
  X-Runtime:
56
- - '0.029776'
66
+ - '0.015958'
57
67
  Date:
58
- - Tue, 13 Apr 2021 17:18:15 GMT
68
+ - Tue, 22 Feb 2022 17:30:35 GMT
59
69
  X-Rack-Cache:
60
70
  - miss
61
71
  Strict-Transport-Security:
62
- - max-age=2629746
72
+ - max-age=31556952; includeSubDomains; preload
63
73
  Vary:
64
74
  - Origin,Accept-Encoding
65
- Transfer-Encoding:
66
- - chunked
75
+ X-Rack-Cors:
76
+ - miss; no-origin
67
77
  Via:
68
- - 1.1 vegur
78
+ - 1.1 vegur, 1.1 bc5ca942c588917a31bb32f85c8bfee4.cloudfront.net (CloudFront)
79
+ X-Cache:
80
+ - Miss from cloudfront
81
+ X-Amz-Cf-Pop:
82
+ - MIA3-C1
83
+ X-Amz-Cf-Id:
84
+ - un9F55L6pkrBF7iWLwA7UrPFXU82QUr7_uyCQ2a9cjEGrFcLtMaxmA==
69
85
  body:
70
86
  encoding: UTF-8
71
87
  string: "[]"
72
- recorded_at: Tue, 13 Apr 2021 17:18:15 GMT
88
+ recorded_at: Tue, 22 Feb 2022 17:30:35 GMT
73
89
  recorded_with: VCR 6.0.0
@@ -1,74 +1,75 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/transactions
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - email@minhaempresa.com.br
12
- Authorization:
13
- - Bearer BOLETOSIMPLES_API_TOKEN
14
- Accept:
15
- - application/json
16
- Accept-Encoding:
17
- - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
- response:
19
- status:
20
- code: 200
21
- message: OK
22
- headers:
23
- Server:
24
- - Cowboy
25
- Connection:
26
- - keep-alive
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
- - ''
43
- Content-Type:
44
- - application/json; charset=utf-8
45
- X-Ratelimit-Limit:
46
- - '60'
47
- X-Ratelimit-Remaining:
48
- - '39'
49
- Etag:
50
- - W/"4642ec3d0b34807fa3dcb57d6ebca932"
51
- Cache-Control:
52
- - must-revalidate, private, max-age=0
53
- X-Request-Id:
54
- - a207601d-1426-45bc-aaeb-4d1413f507c3
55
- X-Runtime:
56
- - '0.039746'
57
- Date:
58
- - Tue, 13 Apr 2021 17:18:55 GMT
59
- X-Rack-Cache:
60
- - miss
61
- Strict-Transport-Security:
62
- - max-age=2629746
63
- Vary:
64
- - Origin,Accept-Encoding
65
- Transfer-Encoding:
66
- - chunked
67
- Via:
68
- - 1.1 vegur
69
- body:
70
- encoding: UTF-8
71
- string: '[{"id":526,"amount":-123.0,"created_at":"2021-04-13T09:34:52-03:00","description":"Upgrade
72
- de Plano","kind":"plan_fee","processed_at":null,"sent_at":null,"status":"unprocessed","credit_at":"2021-04-13"}]'
73
- recorded_at: Tue, 13 Apr 2021 17:18:55 GMT
3
+ - request:
4
+ method: get
5
+ uri: https://api-sandbox.kobana.com.br/v1/transactions
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ User-Agent:
11
+ - email@minhaempresa.com.br
12
+ Authorization:
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
+ Accept:
15
+ - application/json
16
+ Accept-Encoding:
17
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - Cowboy
25
+ Connection:
26
+ - keep-alive
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
+ - ''
43
+ Content-Type:
44
+ - application/json; charset=utf-8
45
+ X-Ratelimit-Limit:
46
+ - '60'
47
+ X-Ratelimit-Remaining:
48
+ - '39'
49
+ Etag:
50
+ - W/"4642ec3d0b34807fa3dcb57d6ebca932"
51
+ Cache-Control:
52
+ - must-revalidate, private, max-age=0
53
+ X-Request-Id:
54
+ - a207601d-1426-45bc-aaeb-4d1413f507c3
55
+ X-Runtime:
56
+ - '0.039746'
57
+ Date:
58
+ - Tue, 13 Apr 2021 17:18:55 GMT
59
+ X-Rack-Cache:
60
+ - miss
61
+ Strict-Transport-Security:
62
+ - max-age=2629746
63
+ Vary:
64
+ - Origin,Accept-Encoding
65
+ Transfer-Encoding:
66
+ - chunked
67
+ Via:
68
+ - 1.1 vegur
69
+ body:
70
+ encoding: UTF-8
71
+ string:
72
+ '[{"id":526,"amount":-123.0,"created_at":"2021-04-13T09:34:52-03:00","description":"Upgrade
73
+ de Plano","kind":"plan_fee","processed_at":null,"sent_at":null,"status":"unprocessed","credit_at":"2021-04-13"}]'
74
+ recorded_at: Tue, 13 Apr 2021 17:18:55 GMT
74
75
  recorded_with: VCR 6.0.0
@@ -2,7 +2,7 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/webhooks
5
+ uri: https://api-sandbox.kobana.com.br/v1/webhooks
6
6
  body:
7
7
  encoding: US-ASCII
8
8
  string: ''
@@ -20,10 +20,14 @@ http_interactions:
20
20
  code: 200
21
21
  message: OK
22
22
  headers:
23
- Server:
24
- - Cowboy
23
+ Content-Type:
24
+ - application/json; charset=utf-8
25
+ Transfer-Encoding:
26
+ - chunked
25
27
  Connection:
26
28
  - keep-alive
29
+ Server:
30
+ - Cowboy
27
31
  X-Frame-Options:
28
32
  - DENY
29
33
  X-Xss-Protection:
@@ -36,38 +40,50 @@ http_interactions:
36
40
  - none
37
41
  Referrer-Policy:
38
42
  - strict-origin-when-cross-origin
43
+ Expect-Ct:
44
+ - max-age=0, report-uri="https://boletosimples.report-uri.com/r/d/ct/reportOnly"
45
+ Cross-Origin-Resource-Policy:
46
+ - cross-origin
47
+ Cross-Origin-Embedder-Policy:
48
+ - unsafe-none
49
+ Cross-Origin-Opener-Policy:
50
+ - unsafe-none
39
51
  Per-Page:
40
52
  - '50'
41
53
  Page:
42
54
  - ''
43
- Content-Type:
44
- - application/json; charset=utf-8
45
55
  X-Ratelimit-Limit:
46
- - '60'
56
+ - '100'
47
57
  X-Ratelimit-Remaining:
48
- - '52'
58
+ - '57'
49
59
  Etag:
50
- - W/"88dbb05d87d7e2af22f847e4896fe83c"
60
+ - W/"79dff2ec4de21708e6553fcf54b023e6"
51
61
  Cache-Control:
52
62
  - must-revalidate, private, max-age=0
53
63
  X-Request-Id:
54
- - e5d86cc6-2a8a-43ef-8cfe-58886569fbf2
64
+ - 76175411-ff4a-4d90-bc79-c018df2feb13
55
65
  X-Runtime:
56
- - '0.033169'
66
+ - '0.025149'
57
67
  Date:
58
- - Tue, 13 Apr 2021 17:18:29 GMT
68
+ - Tue, 22 Feb 2022 17:30:43 GMT
59
69
  X-Rack-Cache:
60
70
  - miss
61
71
  Strict-Transport-Security:
62
- - max-age=2629746
72
+ - max-age=31556952; includeSubDomains; preload
63
73
  Vary:
64
74
  - Origin,Accept-Encoding
65
- Transfer-Encoding:
66
- - chunked
75
+ X-Rack-Cors:
76
+ - miss; no-origin
67
77
  Via:
68
- - 1.1 vegur
78
+ - 1.1 vegur, 1.1 022bce4b6ed717be65317e9e6e08b754.cloudfront.net (CloudFront)
79
+ X-Cache:
80
+ - Miss from cloudfront
81
+ X-Amz-Cf-Pop:
82
+ - MIA3-C1
83
+ X-Amz-Cf-Id:
84
+ - gLqN-YoNSOEOrYRZKcMpeSbBECprSOcJgEDWEzh33cuQuUUrwQHRHg==
69
85
  body:
70
86
  encoding: UTF-8
71
- string: '[{"id":3888,"url":"https://reqbs.herokuapp.com/r0b6mqr0?inspect","content_type":"application/json","events":["bank_billet.*"],"ssl_verification_enabled":true,"active":true,"secret_key":"7d467d0d0902c2052961282bdb7b688472f808ceb2a2192f4377bcd103de2d80","bank_billet_account_id":null,"concurrency_limit":10}]'
72
- recorded_at: Tue, 13 Apr 2021 17:18:29 GMT
87
+ string: '[{"id":1941,"url":"https://iagro.herokuapp.com/callbacks/boletosimples","content_type":"application/json","events":["bank_billet.*"],"ssl_verification_enabled":true,"active":true,"secret_key":"fa0bcbf2929b402fd485b9150b1cabfede36b9817ffc00512b8b32f75e2919cf","bank_billet_account_id":659,"concurrency_limit":10},{"id":53,"url":"http://requestb.in/1gsu9nc1","content_type":"application/json","events":["*"],"ssl_verification_enabled":true,"active":true,"secret_key":"17ac7d44600e4a09388f81c3f9ed21926a70f562dd31c7a70e58aced4719fe1e","bank_billet_account_id":659,"concurrency_limit":10}]'
88
+ recorded_at: Tue, 22 Feb 2022 17:30:43 GMT
73
89
  recorded_with: VCR 6.0.0