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
@@ -1,165 +1,77 @@
1
1
  ---
2
2
  http_interactions:
3
- - request:
4
- method: get
5
- uri: https://sandbox.boletosimples.com.br/api/v1/customer_subscriptions/4?access_token=BOLETOSIMPLES_ACCESS_TOKEN
6
- body:
7
- encoding: US-ASCII
8
- string: ''
9
- headers:
10
- User-Agent:
11
- - BoletoSimples Ruby Client v0.4.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
- Connection:
24
- - 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:49:45 GMT
37
- Strict-Transport-Security:
38
- - max-age=631138519
39
- X-Ratelimit-Remaining:
40
- - '488'
41
- Vary:
42
- - Accept-Encoding
43
- X-Permitted-Cross-Domain-Policies:
44
- - none
45
- X-Xss-Protection:
46
- - 1; mode=block
47
- X-Request-Id:
48
- - 23eb19bc-5949-432f-9f51-68298fcb5dc7
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/customer_subscriptions/4
60
- X-Download-Options:
61
- - noopen
62
- Etag:
63
- - W/"fc1c5eee3b0e21014ab204a47d329184"
64
- X-Runtime:
65
- - '0.895405'
66
- X-Frame-Options:
67
- - sameorigin
68
- X-Content-Type-Options:
69
- - nosniff
70
- X-Rack-Cache:
71
- - miss
72
- X-Powered-By:
73
- - Phusion Passenger 5.0.30
74
- Server:
75
- - nginx/1.10.1 + Phusion Passenger 5.0.30
76
- Via:
77
- - 1.1 vegur
78
- body:
79
- encoding: UTF-8
80
- string: '{"id":4,"amount":1120.4,"cycle":"monthly","next_billing":"2016-09-15","end_at":null,"instructions":null,"customer_id":11,"description":"Hospedagem","created_at":"2016-08-15","updated_at":"2016-08-15","created_via_api":true,"days_in_advance":7,"bank_billet_account_id":12}'
81
- http_version:
82
- recorded_at: Mon, 15 Aug 2016 19:49:45 GMT
83
3
  - request:
84
4
  method: post
85
- uri: https://sandbox.boletosimples.com.br/api/v1/customer_subscriptions/4/next_charge?access_token=BOLETOSIMPLES_ACCESS_TOKEN
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/customer_subscriptions/2640/next_charge
86
6
  body:
87
7
  encoding: UTF-8
88
- string: "{}"
8
+ string: '{"customer_subscription":{"id":2640}}'
89
9
  headers:
90
10
  User-Agent:
91
- - BoletoSimples Ruby Client v0.4.0 (contato@boletosimples.com.br)
11
+ - email@minhaempresa.com.br
92
12
  Authorization:
93
- - Token token="BOLETOSIMPLES_ACCESS_TOKEN"
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
94
14
  Content-Type:
95
15
  - application/json
16
+ Accept:
17
+ - application/json
96
18
  Accept-Encoding:
97
19
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
- Accept:
99
- - "*/*"
100
20
  response:
101
21
  status:
102
22
  code: 201
103
23
  message: Created
104
24
  headers:
25
+ Server:
26
+ - Cowboy
105
27
  Connection:
106
28
  - keep-alive
107
- Content-Type:
108
- - application/json; charset=utf-8
109
- Transfer-Encoding:
110
- - chunked
111
- Status:
112
- - 201 Created
113
- Cache-Control:
114
- - max-age=0, private, must-revalidate
115
- X-Ratelimit-Limit:
116
- - '500'
117
- Date:
118
- - Mon, 15 Aug 2016 19:49:47 GMT
119
- Strict-Transport-Security:
120
- - max-age=631138519
121
- X-Ratelimit-Remaining:
122
- - '487'
123
- Vary:
124
- - Accept-Encoding
125
- X-Permitted-Cross-Domain-Policies:
126
- - none
29
+ X-Frame-Options:
30
+ - DENY
127
31
  X-Xss-Protection:
128
32
  - 1; mode=block
129
- X-Request-Id:
130
- - 725dd915-8c35-4bfc-b4ce-efe477de6b7c
131
- Content-Security-Policy-Report-Only:
132
- - 'default-src ''self''; child-src ''self'' www.googleadservices.com googleads.g.doubleclick.net
133
- www.google.com; connect-src ws: wss: *.intercom.io ws.pusherapp.com hn.inspectlet.com
134
- stats.pusher.com; font-src ''self'' fonts.googleapis.com fonts.gstatic.com
135
- data:; img-src ''self'' https: data:; script-src ''self'' static.intercomcdn.com
136
- cdn.inspectlet.com widget.intercom.io js.intercomcdn.com js.pusher.com stats.pusher.com
137
- zapier.com www.google-analytics.com www.googleadservices.com i.kissmetrics.com
138
- doug1izaerwt3.cloudfront.net app.popupdomination.com cdn.ywxi.net www.draw.io;
139
- style-src ''self'' fonts.googleapis.com; report-uri https://boletosimples.report-uri.io/r/default/csp/reportOnly'
140
- Location:
141
- - https://sandbox.boletosimples.com.br/api/v1/customer_subscriptions/4
33
+ X-Content-Type-Options:
34
+ - nosniff
142
35
  X-Download-Options:
143
36
  - noopen
37
+ X-Permitted-Cross-Domain-Policies:
38
+ - none
39
+ Referrer-Policy:
40
+ - strict-origin-when-cross-origin
41
+ Location:
42
+ - https://sandbox.boletosimples.com.br/api/v1/customer_subscriptions/2640
43
+ Content-Type:
44
+ - application/json; charset=utf-8
45
+ X-Ratelimit-Limit:
46
+ - '1000'
47
+ X-Ratelimit-Remaining:
48
+ - '976'
144
49
  Etag:
145
- - W/"591a0ffde1eb3b777bde3859ce549303"
50
+ - W/"8d4430a3fcc6d6454810a039e5399a23"
51
+ Cache-Control:
52
+ - max-age=0, private, must-revalidate
53
+ X-Request-Id:
54
+ - f707b85a-f9c0-4f14-bb5c-b501adc77f9c
146
55
  X-Runtime:
147
- - '1.538429'
148
- X-Frame-Options:
149
- - sameorigin
150
- X-Content-Type-Options:
151
- - nosniff
56
+ - '0.208274'
57
+ Date:
58
+ - Tue, 13 Apr 2021 17:18:59 GMT
152
59
  X-Rack-Cache:
153
60
  - invalidate, pass
154
- X-Powered-By:
155
- - Phusion Passenger 5.0.30
156
- Server:
157
- - nginx/1.10.1 + Phusion Passenger 5.0.30
61
+ Strict-Transport-Security:
62
+ - max-age=2629746
63
+ Vary:
64
+ - Origin,Accept-Encoding
65
+ Transfer-Encoding:
66
+ - chunked
158
67
  Via:
159
68
  - 1.1 vegur
160
69
  body:
161
70
  encoding: UTF-8
162
- string: '{"id":4,"amount":1120.4,"cycle":"monthly","next_billing":"2016-10-15","end_at":null,"instructions":null,"customer_id":11,"description":"Hospedagem","created_at":"2016-08-15","updated_at":"2016-08-15","created_via_api":true,"days_in_advance":7,"bank_billet_account_id":12}'
163
- http_version:
164
- recorded_at: Mon, 15 Aug 2016 19:49:47 GMT
165
- recorded_with: VCR 3.0.3
71
+ string: '{"id":2640,"amount":1120.4,"cycle":"monthly","next_billing":"2021-06-13","end_at":null,"instructions":null,"customer_id":80703,"customer_person_name":"Joao
72
+ da Silva","customer_cnpj_cpf":"18.033.842/0001-05","customer_address":"Rua
73
+ quinhentos","customer_state":"RJ","customer_neighborhood":"Sao Francisco","customer_zipcode":"12312123","customer_address_number":"111","customer_address_complement":"Sala
74
+ 4","customer_phone_number":"2112123434","customer_email":"cliente@example.com","customer_city_name":"Rio
75
+ 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,"description":"Hospedagem","created_at":"2021-04-13T14:18:56-03:00","updated_at":"2021-04-13T14:18:59-03:00","created_via_api":true,"days_in_advance":7,"bank_billet_account_id":3547,"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,"email":null,"bank_billet_layout_id":null,"bank_billet_ids":[382373],"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}'
76
+ recorded_at: Tue, 13 Apr 2021 17:18:59 GMT
77
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,75 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/imports/customer_subscriptions
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
+ - '58'
49
+ Etag:
50
+ - W/"7bea2f7cdd976a9961d0ec4b143e478f"
51
+ Cache-Control:
52
+ - must-revalidate, private, max-age=0
53
+ X-Request-Id:
54
+ - afc1ec37-55c3-44cc-ab68-af5b0ba68139
55
+ X-Runtime:
56
+ - '0.031454'
57
+ Date:
58
+ - Tue, 13 Apr 2021 17:18:18 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":1053,"created_rows":0,"enqueued_at":"2021-04-13T14:18:16-03:00","started_at":null,"finished_at":null,"processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":null,"processed_rows":0,"total_rows":null,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"enqueued","created_via_api":true},{"id":1051,"created_rows":0,"enqueued_at":"2021-04-13T11:43:57-03:00","started_at":"2021-04-13T11:46:14-03:00","finished_at":"2021-04-13T11:46:16-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1050,"created_rows":0,"enqueued_at":"2021-04-13T11:39:58-03:00","started_at":"2021-04-13T11:39:58-03:00","finished_at":"2021-04-13T11:39:59-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1047,"created_rows":0,"enqueued_at":"2021-04-13T11:35:40-03:00","started_at":"2021-04-13T11:39:30-03:00","finished_at":"2021-04-13T11:39:31-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1045,"created_rows":0,"enqueued_at":"2021-04-13T11:26:43-03:00","started_at":"2021-04-13T11:39:32-03:00","finished_at":"2021-04-13T11:39:33-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1043,"created_rows":0,"enqueued_at":"2021-04-13T11:22:04-03:00","started_at":"2021-04-13T11:24:30-03:00","finished_at":"2021-04-13T11:24:30-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":"ERR
72
+ max number of clients reached","processed_rows":0,"total_rows":null,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"fatal_error","created_via_api":true},{"id":1042,"created_rows":0,"enqueued_at":"2021-04-13T11:10:14-03:00","started_at":"2021-04-13T11:12:10-03:00","finished_at":"2021-04-13T11:12:10-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":"ERR
73
+ max number of clients reached","processed_rows":0,"total_rows":null,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"fatal_error","created_via_api":true},{"id":1040,"created_rows":0,"enqueued_at":"2021-04-13T11:03:09-03:00","started_at":"2021-04-13T11:05:42-03:00","finished_at":"2021-04-13T11:05:44-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1037,"created_rows":0,"enqueued_at":"2021-04-13T10:55:21-03:00","started_at":"2021-04-13T10:56:57-03:00","finished_at":"2021-04-13T10:56:58-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1034,"created_rows":0,"enqueued_at":"2021-04-13T10:00:12-03:00","started_at":"2021-04-13T10:02:02-03:00","finished_at":"2021-04-13T10:02:03-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1033,"created_rows":0,"enqueued_at":"2021-04-13T09:27:16-03:00","started_at":"2021-04-13T09:28:55-03:00","finished_at":"2021-04-13T09:28:55-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1031,"created_rows":0,"enqueued_at":"2021-04-12T11:55:37-03:00","started_at":"2021-04-12T11:57:09-03:00","finished_at":"2021-04-12T11:57:09-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1028,"created_rows":0,"enqueued_at":"2021-04-09T11:16:43-03:00","started_at":"2021-04-09T11:19:23-03:00","finished_at":"2021-04-09T11:19:24-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true},{"id":1027,"created_rows":0,"enqueued_at":"2021-04-09T10:02:09-03:00","started_at":"2021-04-09T10:03:40-03:00","finished_at":"2021-04-09T10:03:40-03:00","processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":[],"processed_rows":0,"total_rows":0,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"done","created_via_api":true}]'
74
+ recorded_at: Tue, 13 Apr 2021 17:18:18 GMT
75
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,69 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/imports/customer_subscriptions
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"customer_subscription_import":{"source":""}}'
9
+ headers:
10
+ User-Agent:
11
+ - email@minhaempresa.com.br
12
+ Authorization:
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
+ Content-Type:
15
+ - application/json
16
+ Accept:
17
+ - application/json
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ Server:
26
+ - Cowboy
27
+ Connection:
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
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ X-Ratelimit-Limit:
44
+ - '1000'
45
+ X-Ratelimit-Remaining:
46
+ - '998'
47
+ Cache-Control:
48
+ - no-cache
49
+ X-Request-Id:
50
+ - f95b83a5-aa00-4869-8e51-f7ff36ff2cca
51
+ X-Runtime:
52
+ - '0.030666'
53
+ Date:
54
+ - Tue, 13 Apr 2021 17:18:21 GMT
55
+ X-Rack-Cache:
56
+ - invalidate, pass
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
59
+ Vary:
60
+ - Origin,Accept-Encoding
61
+ Transfer-Encoding:
62
+ - chunked
63
+ Via:
64
+ - 1.1 vegur
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"errors":{"source":["não pode ficar em branco"]}}'
68
+ recorded_at: Tue, 13 Apr 2021 17:18:21 GMT
69
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,70 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/imports/customer_subscriptions
6
+ body:
7
+ encoding: UTF-8
8
+ string: '{"customer_subscription_import":{}}'
9
+ headers:
10
+ User-Agent:
11
+ - email@minhaempresa.com.br
12
+ Authorization:
13
+ - Bearer BOLETOSIMPLES_API_TOKEN
14
+ Content-Type:
15
+ - application/json
16
+ Accept:
17
+ - application/json
18
+ Accept-Encoding:
19
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
20
+ response:
21
+ status:
22
+ code: 422
23
+ message: Unprocessable Entity
24
+ headers:
25
+ Server:
26
+ - Cowboy
27
+ Connection:
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
41
+ Content-Type:
42
+ - application/json; charset=utf-8
43
+ X-Ratelimit-Limit:
44
+ - '1000'
45
+ X-Ratelimit-Remaining:
46
+ - '997'
47
+ Cache-Control:
48
+ - no-cache
49
+ X-Request-Id:
50
+ - c0f61293-6afd-48bf-a5bd-5f51360ac45a
51
+ X-Runtime:
52
+ - '0.019555'
53
+ Date:
54
+ - Tue, 13 Apr 2021 17:18:22 GMT
55
+ X-Rack-Cache:
56
+ - invalidate, pass
57
+ Strict-Transport-Security:
58
+ - max-age=2629746
59
+ Vary:
60
+ - Origin,Accept-Encoding
61
+ Transfer-Encoding:
62
+ - chunked
63
+ Via:
64
+ - 1.1 vegur
65
+ body:
66
+ encoding: UTF-8
67
+ string: '{"errors":[{"title":"customer_subscription_import não pode ficar em
68
+ branco","status":422,"code":422}]}'
69
+ recorded_at: Tue, 13 Apr 2021 17:18:22 GMT
70
+ recorded_with: VCR 6.0.0
@@ -0,0 +1,76 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://sandbox.boletosimples.com.br/api/v1/imports/customer_subscriptions
6
+ body:
7
+ encoding: ASCII-8BIT
8
+ string: !binary |-
9
+ LS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0LTdlY2U3Njk0ZTUyODZkZTEwOGUyZTU2ODIyYTQwYmNiDQpDb250ZW50LURpc3Bvc2l0aW9uOiBmb3JtLWRhdGE7IG5hbWU9ImN1c3RvbWVyX3N1YnNjcmlwdGlvbl9pbXBvcnRbc291cmNlXSI7IGZpbGVuYW1lPSJjdXN0b21lcl9zdWJzY3JpcHRpb25zLmNzdiINCkNvbnRlbnQtTGVuZ3RoOiAyMzkNCkNvbnRlbnQtVHlwZTogdGV4dC9jc3YNCkNvbnRlbnQtVHJhbnNmZXItRW5jb2Rpbmc6IGJpbmFyeQ0KDQpJRCxJRCBkbyBDbGllbnRlLElEIGRhIENhcnRlaXJhLElEIGRvIE1vZGVsbyxDTlBKL0NQRiBkbyBDbGllbnRlLENpY2xvIGRhIEFzc2luYXR1cmEsUXVhbnRpYSAqLFByaW1laXJhIENvYnJhbsOnYSxBbnRlY2Vkw6puY2lhLFBhcmFyIGVtLERlbW9uc3RyYXRpdm8gKixJbnN0cnXDp8O1ZXMgcGFyYSBvIENhaXhhLE11bHRhIHBvciBBdHJhc28sSnVyb3MgZGUgTW9yYSBNZW5zYWwsRS1tYWlsLE9ic2VydmHDp8O1ZXMNCg0KLS0tLS0tLS0tLS0tLVJ1YnlNdWx0aXBhcnRQb3N0LTdlY2U3Njk0ZTUyODZkZTEwOGUyZTU2ODIyYTQwYmNiLS0NCg==
10
+ headers:
11
+ User-Agent:
12
+ - email@minhaempresa.com.br
13
+ Authorization:
14
+ - Bearer BOLETOSIMPLES_API_TOKEN
15
+ Content-Type:
16
+ - multipart/form-data; boundary=-----------RubyMultipartPost-7ece7694e5286de108e2e56822a40bcb
17
+ Content-Length:
18
+ - '571'
19
+ Accept:
20
+ - application/json
21
+ Accept-Encoding:
22
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
23
+ response:
24
+ status:
25
+ code: 201
26
+ message: Created
27
+ headers:
28
+ Server:
29
+ - Cowboy
30
+ Connection:
31
+ - keep-alive
32
+ X-Frame-Options:
33
+ - DENY
34
+ X-Xss-Protection:
35
+ - 1; mode=block
36
+ X-Content-Type-Options:
37
+ - nosniff
38
+ X-Download-Options:
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/imports/customer_subscriptions/1053
46
+ Content-Type:
47
+ - application/json; charset=utf-8
48
+ X-Ratelimit-Limit:
49
+ - '1000'
50
+ X-Ratelimit-Remaining:
51
+ - '999'
52
+ Etag:
53
+ - W/"b99d66a320d3419430f8bb66bf777696"
54
+ Cache-Control:
55
+ - max-age=0, private, must-revalidate
56
+ X-Request-Id:
57
+ - 38bae327-df59-4c7e-aa89-ff240e1ea2ed
58
+ X-Runtime:
59
+ - '1.498103'
60
+ Date:
61
+ - Tue, 13 Apr 2021 17:18:17 GMT
62
+ X-Rack-Cache:
63
+ - invalidate, pass
64
+ Strict-Transport-Security:
65
+ - max-age=2629746
66
+ Vary:
67
+ - Origin,Accept-Encoding
68
+ Transfer-Encoding:
69
+ - chunked
70
+ Via:
71
+ - 1.1 vegur
72
+ body:
73
+ encoding: UTF-8
74
+ string: '{"id":1053,"created_rows":0,"enqueued_at":"2021-04-13T14:18:16-03:00","started_at":null,"finished_at":null,"processed_at":null,"failed_to_create_rows":0,"failed_to_update_rows":0,"import_errors":null,"processed_rows":0,"total_rows":null,"updated_rows":0,"source_file_name":"customer_subscriptions.csv","source_file_size":239,"status":"enqueued","created_via_api":true}'
75
+ recorded_at: Tue, 13 Apr 2021 17:18:17 GMT
76
+ recorded_with: VCR 6.0.0