boletosimples 0.4.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -14
- data/README.md +12 -54
- data/lib/boletosimples.rb +10 -6
- data/lib/boletosimples/configuration.rb +18 -33
- data/lib/boletosimples/last_request.rb +12 -9
- data/lib/boletosimples/middlewares/bearer.rb +12 -0
- data/lib/boletosimples/middlewares/last_request.rb +3 -1
- data/lib/boletosimples/middlewares/raise_error.rb +9 -2
- data/lib/boletosimples/middlewares/user_agent.rb +3 -1
- data/lib/boletosimples/resources/bank_billet.rb +5 -11
- data/lib/boletosimples/resources/bank_billet_account.rb +3 -1
- data/lib/boletosimples/resources/bank_billet_discharge.rb +6 -0
- data/lib/boletosimples/resources/bank_billet_payment.rb +6 -0
- data/lib/boletosimples/resources/bank_billet_remittance.rb +6 -0
- data/lib/boletosimples/resources/base_model.rb +3 -1
- data/lib/boletosimples/resources/customer.rb +3 -1
- data/lib/boletosimples/resources/customer_import.rb +8 -0
- data/lib/boletosimples/resources/customer_subscription.rb +3 -10
- data/lib/boletosimples/resources/customer_subscription_import.rb +8 -0
- data/lib/boletosimples/resources/discharge.rb +4 -11
- data/lib/boletosimples/resources/email_delivery.rb +6 -0
- data/lib/boletosimples/resources/event.rb +3 -1
- data/lib/boletosimples/resources/installment.rb +3 -1
- data/lib/boletosimples/resources/remittance.rb +3 -1
- data/lib/boletosimples/resources/sms_delivery.rb +6 -0
- data/lib/boletosimples/resources/transaction.rb +3 -1
- data/lib/boletosimples/resources/webhook.rb +3 -1
- data/lib/boletosimples/resources/webhook_delivery.rb +3 -1
- data/lib/boletosimples/response_error.rb +8 -3
- data/lib/boletosimples/version.rb +3 -1
- data/spec/boletosimples/configuration_spec.rb +71 -83
- data/spec/boletosimples/last_request_spec.rb +16 -28
- data/spec/boletosimples/resources/bank_billet_account_spec.rb +57 -33
- data/spec/boletosimples/resources/bank_billet_discharge_spec.rb +12 -0
- data/spec/boletosimples/resources/bank_billet_payment_spec.rb +12 -0
- data/spec/boletosimples/resources/bank_billet_remittance_spec.rb +12 -0
- data/spec/boletosimples/resources/bank_billet_spec.rb +56 -42
- data/spec/boletosimples/resources/customer_import_spec.rb +67 -0
- data/spec/boletosimples/resources/customer_spec.rb +52 -39
- data/spec/boletosimples/resources/customer_subscription_import_spec.rb +67 -0
- data/spec/boletosimples/resources/customer_subscription_spec.rb +61 -33
- data/spec/boletosimples/resources/discharge_spec.rb +64 -11
- data/spec/boletosimples/resources/email_delivery_spec.rb +12 -0
- data/spec/boletosimples/resources/event_spec.rb +7 -12
- data/spec/boletosimples/resources/installment_spec.rb +61 -32
- data/spec/boletosimples/resources/remittance_spec.rb +7 -12
- data/spec/boletosimples/resources/sms_delivery_spec.rb +12 -0
- data/spec/boletosimples/resources/transactions_spec.rb +7 -12
- data/spec/boletosimples/resources/webhook_delivery_spec.rb +7 -12
- data/spec/boletosimples/resources/webhook_spec.rb +7 -12
- data/spec/fixtures/customer_imports.csv +1 -0
- data/spec/fixtures/customer_subscription_imports.csv +1 -0
- data/spec/fixtures/discharge.RET +3 -0
- data/spec/fixtures/vcr_cassettes/last_request/bank_billets.yml +536 -88
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml +537 -91
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml +34 -92
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml +32 -20
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml +28 -17
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml +43 -27
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml +83 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml +51 -27
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml +131 -20
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml +34 -20
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml +30 -19
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml +41 -21
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml +38 -18
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml +97 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml +75 -0
- data/spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml +126 -0
- data/spec/fixtures/vcr_cassettes/resources/customer/all.yml +79 -32
- data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml +30 -17
- data/spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml +28 -17
- data/spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml +33 -21
- data/spec/fixtures/vcr_cassettes/resources/customer/find.yml +33 -19
- data/spec/fixtures/vcr_cassettes/resources/customer_import/all.yml +74 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml +69 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml +69 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml +76 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_import/find.yml +71 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml +102 -52
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml +40 -50
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml +36 -48
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml +48 -53
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml +44 -50
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml +45 -133
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml +75 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml +69 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml +70 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml +76 -0
- data/spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml +71 -0
- data/spec/fixtures/vcr_cassettes/resources/discharge/all.yml +64 -33
- data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml +70 -0
- data/spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml +69 -0
- data/spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml +84 -0
- data/spec/fixtures/vcr_cassettes/resources/discharge/find.yml +71 -0
- data/spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml +73 -0
- data/spec/fixtures/vcr_cassettes/resources/event/all.yml +490 -166
- data/spec/fixtures/vcr_cassettes/resources/installment/all.yml +418 -52
- data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml +41 -52
- data/spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml +36 -48
- data/spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml +48 -53
- data/spec/fixtures/vcr_cassettes/resources/installment/find.yml +44 -52
- data/spec/fixtures/vcr_cassettes/resources/remittance/all.yml +53 -33
- data/spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml +73 -0
- data/spec/fixtures/vcr_cassettes/resources/transaction/all.yml +34 -22
- data/spec/fixtures/vcr_cassettes/resources/web_hook/all.yml +42 -33
- data/spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml +1232 -54
- data/spec/spec_helper.rb +3 -20
- data/spec/support/stub_env.rb +7 -0
- data/spec/support/vcr.rb +3 -4
- metadata +190 -82
- data/.coveralls.yml +0 -2
- data/.gitignore +0 -19
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
- data/.travis.yml +0 -11
- data/Gemfile +0 -4
- data/Rakefile +0 -6
- data/boletosimples.gemspec +0 -37
- data/lib/boletosimples/extra.rb +0 -8
- data/lib/boletosimples/resources/partner/user.rb +0 -7
- data/lib/oauth2_patch.rb +0 -24
- data/spec/boletosimples/extra_spec.rb +0 -31
- data/spec/boletosimples/resources/partner/user_spec.rb +0 -19
- data/spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml +0 -64
- data/spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml +0 -56
- data/spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml +0 -58
- data/spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml +0 -54
- data/spec/fixtures/vcr_cassettes/last_request/userinfo.yml +0 -58
- data/spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml +0 -118
- data/spec/fixtures/vcr_cassettes/resources/partner/user/create.yml +0 -60
- 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
|
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
|
-
-
|
11
|
+
- email@minhaempresa.com.br
|
12
12
|
Authorization:
|
13
|
-
-
|
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
|
-
|
28
|
-
-
|
29
|
-
|
30
|
-
-
|
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
|
-
- '
|
46
|
+
- '60'
|
35
47
|
X-Ratelimit-Remaining:
|
36
|
-
- '
|
48
|
+
- '32'
|
37
49
|
Etag:
|
38
|
-
- W/"
|
50
|
+
- W/"667a693af60595f15bccf9f8562b85cd"
|
39
51
|
Cache-Control:
|
40
52
|
- must-revalidate, private, max-age=0
|
41
53
|
X-Request-Id:
|
42
|
-
-
|
54
|
+
- 45f986c4-9cd6-4a4c-a891-89f48e51565f
|
43
55
|
X-Runtime:
|
44
|
-
- '0.
|
56
|
+
- '0.033612'
|
45
57
|
Date:
|
46
|
-
-
|
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":
|
58
|
-
quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
59
|
-
|
60
|
-
de Janeiro","person_name":"Joao da Silva","address":"Rua quinhentos","address_complement":"Sala
|
61
|
-
4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
de Janeiro","person_name":"
|
68
|
-
4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
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
|
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
|
-
-
|
11
|
+
- email@minhaempresa.com.br
|
12
12
|
Authorization:
|
13
|
-
-
|
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
|
-
|
30
|
-
-
|
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
|
-
- '
|
44
|
+
- '1000'
|
35
45
|
X-Ratelimit-Remaining:
|
36
|
-
- '
|
46
|
+
- '972'
|
37
47
|
Cache-Control:
|
38
48
|
- no-cache
|
39
49
|
X-Request-Id:
|
40
|
-
-
|
50
|
+
- b9e6e5c7-8f5b-41ee-94fa-6ec5bc1c15e5
|
41
51
|
X-Runtime:
|
42
|
-
- '0.
|
52
|
+
- '0.026849'
|
43
53
|
Date:
|
44
|
-
-
|
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
|
-
|
58
|
-
|
59
|
-
|
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
|
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
|
-
-
|
11
|
+
- email@minhaempresa.com.br
|
12
12
|
Authorization:
|
13
|
-
-
|
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
|
-
|
30
|
-
-
|
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
|
-
- '
|
44
|
+
- '1000'
|
35
45
|
X-Ratelimit-Remaining:
|
36
|
-
- '
|
46
|
+
- '971'
|
37
47
|
Cache-Control:
|
38
48
|
- no-cache
|
39
49
|
X-Request-Id:
|
40
|
-
-
|
50
|
+
- 11cbaf30-2b23-4517-a48e-f38050c17f17
|
41
51
|
X-Runtime:
|
42
|
-
- '0.
|
52
|
+
- '0.017993'
|
43
53
|
Date:
|
44
|
-
-
|
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":{"
|
56
|
-
|
57
|
-
|
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
|
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":"
|
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
|
-
-
|
13
|
+
- email@minhaempresa.com.br
|
14
14
|
Authorization:
|
15
|
-
-
|
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
|
-
|
32
|
-
-
|
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/
|
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
|
-
- '
|
48
|
+
- '1000'
|
39
49
|
X-Ratelimit-Remaining:
|
40
|
-
- '
|
50
|
+
- '973'
|
41
51
|
Etag:
|
42
|
-
- W/"
|
52
|
+
- W/"bf421a7739e6fb5b4a0a6574f14546dc"
|
43
53
|
Cache-Control:
|
44
54
|
- max-age=0, private, must-revalidate
|
45
55
|
X-Request-Id:
|
46
|
-
-
|
56
|
+
- bb3b5ce6-4428-40df-a4b7-1fa6bcf98aec
|
47
57
|
X-Runtime:
|
48
|
-
- '0.
|
58
|
+
- '0.069261'
|
49
59
|
Date:
|
50
|
-
-
|
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":
|
62
|
-
quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
63
|
-
|
64
|
-
recorded_at:
|
65
|
-
recorded_with: VCR
|
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/
|
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
|
-
-
|
11
|
+
- email@minhaempresa.com.br
|
12
12
|
Authorization:
|
13
|
-
-
|
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
|
-
|
28
|
-
-
|
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
|
-
- '
|
44
|
+
- '60'
|
33
45
|
X-Ratelimit-Remaining:
|
34
|
-
- '
|
46
|
+
- '33'
|
35
47
|
Etag:
|
36
|
-
- W/"
|
48
|
+
- W/"bf421a7739e6fb5b4a0a6574f14546dc"
|
37
49
|
Cache-Control:
|
38
50
|
- must-revalidate, private, max-age=0
|
39
51
|
X-Request-Id:
|
40
|
-
-
|
52
|
+
- 63ba0393-f0c9-4be2-82b6-f954656cdee5
|
41
53
|
X-Runtime:
|
42
|
-
- '0.
|
54
|
+
- '0.031891'
|
43
55
|
Date:
|
44
|
-
-
|
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":
|
56
|
-
quinhentos","address_complement":"Sala 4","address_number":"111","mobile_number":null,"cnpj_cpf":"
|
57
|
-
|
58
|
-
recorded_at:
|
59
|
-
recorded_with: VCR
|
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
|