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
data/spec/spec_helper.rb CHANGED
@@ -1,25 +1,10 @@
1
- require 'coveralls'
2
- Coveralls.wear!
3
-
4
- require 'codeclimate-test-reporter'
5
- CodeClimate::TestReporter.start
1
+ # frozen_string_literal: true
6
2
 
7
3
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
8
4
  $LOAD_PATH.unshift(File.dirname(__FILE__))
9
5
  require 'rspec'
10
- require 'pry'
11
6
  require 'boletosimples'
12
7
 
13
- if(ENV['BOLETOSIMPLES_ACCESS_TOKEN'].nil?)
14
- puts "\e[31mWarning: Environment variable BOLETOSIMPLES_ACCESS_TOKEN is not set. Tests will run and pass, but if you delete vcr cassettes you need to set this variable before running tests.\e[0m"
15
- ENV['BOLETOSIMPLES_ACCESS_TOKEN'] = 'any-token'
16
- end
17
-
18
- if(ENV['BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN'].nil?)
19
- puts "\e[31mWarning: Environment variable BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN is not set. Tests will run and pass, but if you delete vcr cassettes you need to set this variable before running tests.\e[0m"
20
- ENV['BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN'] = 'any-token'
21
- end
22
-
23
8
  RSpec.configure do |config|
24
9
  config.disable_monkey_patching!
25
10
  config.order = :random
@@ -33,11 +18,9 @@ RSpec.configure do |config|
33
18
  mocks.syntax = :expect
34
19
  mocks.verify_partial_doubles = true
35
20
  end
36
- if config.files_to_run.one?
37
- config.default_formatter = 'doc'
38
- end
21
+ config.default_formatter = 'doc' if config.files_to_run.one?
39
22
  end
40
23
 
41
24
  # Requires supporting files with custom matchers and macros, etc,
42
25
  # in ./support/ and its subdirectories.
43
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
26
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].sort.each { |f| require f }
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'stub_env'
4
+
5
+ RSpec.configure do |config|
6
+ config.include StubEnv::Helpers
7
+ end
data/spec/support/vcr.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'vcr'
2
4
 
3
5
  VCR.configure do |c|
@@ -8,8 +10,5 @@ VCR.configure do |c|
8
10
  c.before_record do |i|
9
11
  i.response.body.force_encoding('UTF-8')
10
12
  end
11
- c.filter_sensitive_data('BOLETOSIMPLES_APP_ID') { ENV['BOLETOSIMPLES_APP_ID'] }
12
- c.filter_sensitive_data('BOLETOSIMPLES_APP_SECRET') { ENV['BOLETOSIMPLES_APP_SECRET'] }
13
- c.filter_sensitive_data('BOLETOSIMPLES_ACCESS_TOKEN') { ENV['BOLETOSIMPLES_ACCESS_TOKEN'] }
14
- c.filter_sensitive_data('BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN') { ENV['BOLETOSIMPLES_CLIENT_CREDENTIALS_TOKEN'] }
13
+ c.filter_sensitive_data('BOLETOSIMPLES_API_TOKEN') { ENV['BOLETOSIMPLES_API_TOKEN'] }
15
14
  end
metadata CHANGED
@@ -1,159 +1,229 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boletosimples
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kivanio Barbosa
8
8
  - Rafael Lima
9
9
  - Thiago Belem
10
- autorequire:
10
+ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-08-15 00:00:00.000000000 Z
13
+ date: 2021-04-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: her
16
+ name: faraday-http-cache
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.1
21
+ version: 2.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.8.1
28
+ version: 2.2.0
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: faraday_middleware
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: 0.10.0
35
+ version: '1.0'
36
36
  type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: 0.10.0
42
+ version: '1.0'
43
43
  - !ruby/object:Gem::Dependency
44
- name: faraday-http-cache
44
+ name: her
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: 1.3.1
49
+ version: '1.1'
50
50
  type: :runtime
51
51
  prerelease: false
52
52
  version_requirements: !ruby/object:Gem::Requirement
53
53
  requirements:
54
54
  - - "~>"
55
55
  - !ruby/object:Gem::Version
56
- version: 1.3.1
56
+ version: '1.1'
57
57
  - !ruby/object:Gem::Dependency
58
- name: pry
58
+ name: fuubar
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ">="
62
62
  - !ruby/object:Gem::Version
63
- version: 0.10.1
63
+ version: '0'
64
64
  type: :development
65
65
  prerelease: false
66
66
  version_requirements: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - "~>"
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rake
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ type: :development
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
69
83
  - !ruby/object:Gem::Version
70
- version: 0.10.1
84
+ version: '0'
71
85
  - !ruby/object:Gem::Dependency
72
86
  name: rspec
73
87
  requirement: !ruby/object:Gem::Requirement
74
88
  requirements:
75
- - - "~>"
89
+ - - ">="
76
90
  - !ruby/object:Gem::Version
77
- version: 3.5.0
91
+ version: '0'
78
92
  type: :development
79
93
  prerelease: false
80
94
  version_requirements: !ruby/object:Gem::Requirement
81
95
  requirements:
82
- - - "~>"
96
+ - - ">="
83
97
  - !ruby/object:Gem::Version
84
- version: 3.5.0
98
+ version: '0'
85
99
  - !ruby/object:Gem::Dependency
86
- name: vcr
100
+ name: rubocop
87
101
  requirement: !ruby/object:Gem::Requirement
88
102
  requirements:
89
- - - "~>"
103
+ - - ">="
90
104
  - !ruby/object:Gem::Version
91
- version: '3.0'
105
+ version: '0'
92
106
  type: :development
93
107
  prerelease: false
94
108
  version_requirements: !ruby/object:Gem::Requirement
95
109
  requirements:
96
- - - "~>"
110
+ - - ">="
97
111
  - !ruby/object:Gem::Version
98
- version: '3.0'
112
+ version: '0'
99
113
  - !ruby/object:Gem::Dependency
100
- name: webmock
114
+ name: rubocop-packaging
101
115
  requirement: !ruby/object:Gem::Requirement
102
116
  requirements:
103
- - - "~>"
117
+ - - ">="
104
118
  - !ruby/object:Gem::Version
105
- version: 2.1.0
119
+ version: '0'
106
120
  type: :development
107
121
  prerelease: false
108
122
  version_requirements: !ruby/object:Gem::Requirement
109
123
  requirements:
110
- - - "~>"
124
+ - - ">="
111
125
  - !ruby/object:Gem::Version
112
- version: 2.1.0
126
+ version: '0'
113
127
  - !ruby/object:Gem::Dependency
114
- name: rake
128
+ name: rubocop-performance
115
129
  requirement: !ruby/object:Gem::Requirement
116
130
  requirements:
117
- - - "~>"
131
+ - - ">="
118
132
  - !ruby/object:Gem::Version
119
- version: 11.2.2
133
+ version: '0'
120
134
  type: :development
121
135
  prerelease: false
122
136
  version_requirements: !ruby/object:Gem::Requirement
123
137
  requirements:
124
- - - "~>"
138
+ - - ">="
125
139
  - !ruby/object:Gem::Version
126
- version: 11.2.2
140
+ version: '0'
127
141
  - !ruby/object:Gem::Dependency
128
- name: coveralls
142
+ name: rubocop-rake
129
143
  requirement: !ruby/object:Gem::Requirement
130
144
  requirements:
131
- - - "~>"
145
+ - - ">="
132
146
  - !ruby/object:Gem::Version
133
- version: 0.8.2
147
+ version: '0'
134
148
  type: :development
135
149
  prerelease: false
136
150
  version_requirements: !ruby/object:Gem::Requirement
137
151
  requirements:
138
- - - "~>"
152
+ - - ">="
139
153
  - !ruby/object:Gem::Version
140
- version: 0.8.2
154
+ version: '0'
141
155
  - !ruby/object:Gem::Dependency
142
- name: codeclimate-test-reporter
156
+ name: rubocop-rspec
143
157
  requirement: !ruby/object:Gem::Requirement
144
158
  requirements:
145
- - - "~>"
159
+ - - ">="
146
160
  - !ruby/object:Gem::Version
147
- version: 0.6.0
161
+ version: '0'
148
162
  type: :development
149
163
  prerelease: false
150
164
  version_requirements: !ruby/object:Gem::Requirement
151
165
  requirements:
152
- - - "~>"
166
+ - - ">="
153
167
  - !ruby/object:Gem::Version
154
- version: 0.6.0
168
+ version: '0'
155
169
  - !ruby/object:Gem::Dependency
156
- name: rubocop
170
+ name: solargraph
171
+ requirement: !ruby/object:Gem::Requirement
172
+ requirements:
173
+ - - ">="
174
+ - !ruby/object:Gem::Version
175
+ version: '0'
176
+ type: :development
177
+ prerelease: false
178
+ version_requirements: !ruby/object:Gem::Requirement
179
+ requirements:
180
+ - - ">="
181
+ - !ruby/object:Gem::Version
182
+ version: '0'
183
+ - !ruby/object:Gem::Dependency
184
+ name: stub_env
185
+ requirement: !ruby/object:Gem::Requirement
186
+ requirements:
187
+ - - ">="
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
190
+ type: :development
191
+ prerelease: false
192
+ version_requirements: !ruby/object:Gem::Requirement
193
+ requirements:
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: '0'
197
+ - !ruby/object:Gem::Dependency
198
+ name: test-prof
199
+ requirement: !ruby/object:Gem::Requirement
200
+ requirements:
201
+ - - ">="
202
+ - !ruby/object:Gem::Version
203
+ version: '0'
204
+ type: :development
205
+ prerelease: false
206
+ version_requirements: !ruby/object:Gem::Requirement
207
+ requirements:
208
+ - - ">="
209
+ - !ruby/object:Gem::Version
210
+ version: '0'
211
+ - !ruby/object:Gem::Dependency
212
+ name: vcr
213
+ requirement: !ruby/object:Gem::Requirement
214
+ requirements:
215
+ - - ">="
216
+ - !ruby/object:Gem::Version
217
+ version: '0'
218
+ type: :development
219
+ prerelease: false
220
+ version_requirements: !ruby/object:Gem::Requirement
221
+ requirements:
222
+ - - ">="
223
+ - !ruby/object:Gem::Version
224
+ version: '0'
225
+ - !ruby/object:Gem::Dependency
226
+ name: webmock
157
227
  requirement: !ruby/object:Gem::Requirement
158
228
  requirements:
159
229
  - - ">="
@@ -175,103 +245,121 @@ executables: []
175
245
  extensions: []
176
246
  extra_rdoc_files: []
177
247
  files:
178
- - ".coveralls.yml"
179
- - ".gitignore"
180
- - ".ruby-gemset"
181
- - ".ruby-version"
182
- - ".travis.yml"
183
248
  - CHANGELOG.md
184
- - Gemfile
185
249
  - LICENSE.txt
186
250
  - README.md
187
- - Rakefile
188
- - boletosimples.gemspec
189
251
  - lib/boletosimples.rb
190
252
  - lib/boletosimples/configuration.rb
191
- - lib/boletosimples/extra.rb
192
253
  - lib/boletosimples/last_request.rb
254
+ - lib/boletosimples/middlewares/bearer.rb
193
255
  - lib/boletosimples/middlewares/last_request.rb
194
256
  - lib/boletosimples/middlewares/raise_error.rb
195
257
  - lib/boletosimples/middlewares/user_agent.rb
196
258
  - lib/boletosimples/resources/bank_billet.rb
197
259
  - lib/boletosimples/resources/bank_billet_account.rb
260
+ - lib/boletosimples/resources/bank_billet_discharge.rb
261
+ - lib/boletosimples/resources/bank_billet_payment.rb
262
+ - lib/boletosimples/resources/bank_billet_remittance.rb
198
263
  - lib/boletosimples/resources/base_model.rb
199
264
  - lib/boletosimples/resources/customer.rb
265
+ - lib/boletosimples/resources/customer_import.rb
200
266
  - lib/boletosimples/resources/customer_subscription.rb
267
+ - lib/boletosimples/resources/customer_subscription_import.rb
201
268
  - lib/boletosimples/resources/discharge.rb
269
+ - lib/boletosimples/resources/email_delivery.rb
202
270
  - lib/boletosimples/resources/event.rb
203
271
  - lib/boletosimples/resources/installment.rb
204
- - lib/boletosimples/resources/partner/user.rb
205
272
  - lib/boletosimples/resources/remittance.rb
273
+ - lib/boletosimples/resources/sms_delivery.rb
206
274
  - lib/boletosimples/resources/transaction.rb
207
275
  - lib/boletosimples/resources/webhook.rb
208
276
  - lib/boletosimples/resources/webhook_delivery.rb
209
277
  - lib/boletosimples/response_error.rb
210
278
  - lib/boletosimples/version.rb
211
- - lib/oauth2_patch.rb
212
279
  - spec/boletosimples/configuration_spec.rb
213
- - spec/boletosimples/extra_spec.rb
214
280
  - spec/boletosimples/last_request_spec.rb
215
281
  - spec/boletosimples/resources/bank_billet_account_spec.rb
282
+ - spec/boletosimples/resources/bank_billet_discharge_spec.rb
283
+ - spec/boletosimples/resources/bank_billet_payment_spec.rb
284
+ - spec/boletosimples/resources/bank_billet_remittance_spec.rb
216
285
  - spec/boletosimples/resources/bank_billet_spec.rb
286
+ - spec/boletosimples/resources/customer_import_spec.rb
217
287
  - spec/boletosimples/resources/customer_spec.rb
288
+ - spec/boletosimples/resources/customer_subscription_import_spec.rb
218
289
  - spec/boletosimples/resources/customer_subscription_spec.rb
219
290
  - spec/boletosimples/resources/discharge_spec.rb
291
+ - spec/boletosimples/resources/email_delivery_spec.rb
220
292
  - spec/boletosimples/resources/event_spec.rb
221
293
  - spec/boletosimples/resources/installment_spec.rb
222
- - spec/boletosimples/resources/partner/user_spec.rb
223
294
  - spec/boletosimples/resources/remittance_spec.rb
295
+ - spec/boletosimples/resources/sms_delivery_spec.rb
224
296
  - spec/boletosimples/resources/transactions_spec.rb
225
297
  - spec/boletosimples/resources/webhook_delivery_spec.rb
226
298
  - spec/boletosimples/resources/webhook_spec.rb
227
- - spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml
228
- - spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml
229
- - spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml
230
- - spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml
299
+ - spec/fixtures/customer_imports.csv
300
+ - spec/fixtures/customer_subscription_imports.csv
301
+ - spec/fixtures/discharge.RET
231
302
  - spec/fixtures/vcr_cassettes/last_request/bank_billets.yml
232
- - spec/fixtures/vcr_cassettes/last_request/userinfo.yml
233
303
  - spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml
234
- - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml
235
304
  - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml
236
305
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml
237
306
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml
238
307
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml
308
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml
239
309
  - spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml
240
310
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml
241
311
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml
242
312
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml
243
313
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml
244
314
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml
315
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml
316
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml
317
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml
245
318
  - spec/fixtures/vcr_cassettes/resources/customer/all.yml
246
319
  - spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml
247
320
  - spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml
248
321
  - spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml
249
322
  - spec/fixtures/vcr_cassettes/resources/customer/find.yml
323
+ - spec/fixtures/vcr_cassettes/resources/customer_import/all.yml
324
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml
325
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml
326
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml
327
+ - spec/fixtures/vcr_cassettes/resources/customer_import/find.yml
250
328
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml
251
329
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml
252
330
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml
253
331
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml
254
332
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml
255
333
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml
334
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml
335
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml
336
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml
337
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml
338
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml
256
339
  - spec/fixtures/vcr_cassettes/resources/discharge/all.yml
340
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml
341
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml
342
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml
343
+ - spec/fixtures/vcr_cassettes/resources/discharge/find.yml
344
+ - spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml
257
345
  - spec/fixtures/vcr_cassettes/resources/event/all.yml
258
346
  - spec/fixtures/vcr_cassettes/resources/installment/all.yml
259
347
  - spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml
260
348
  - spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml
261
349
  - spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml
262
350
  - spec/fixtures/vcr_cassettes/resources/installment/find.yml
263
- - spec/fixtures/vcr_cassettes/resources/partner/user/create.yml
264
351
  - spec/fixtures/vcr_cassettes/resources/remittance/all.yml
352
+ - spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml
265
353
  - spec/fixtures/vcr_cassettes/resources/transaction/all.yml
266
354
  - spec/fixtures/vcr_cassettes/resources/web_hook/all.yml
267
355
  - spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml
268
- - spec/spec.opts
269
356
  - spec/spec_helper.rb
357
+ - spec/support/stub_env.rb
270
358
  - spec/support/vcr.rb
271
359
  homepage: https://github.com/BoletoSimples/boletosimples-ruby
272
360
  licenses: []
273
361
  metadata: {}
274
- post_install_message:
362
+ post_install_message:
275
363
  rdoc_options: []
276
364
  require_paths:
277
365
  - lib
@@ -279,75 +367,95 @@ required_ruby_version: !ruby/object:Gem::Requirement
279
367
  requirements:
280
368
  - - ">="
281
369
  - !ruby/object:Gem::Version
282
- version: '1.9'
370
+ version: '0'
283
371
  required_rubygems_version: !ruby/object:Gem::Requirement
284
372
  requirements:
285
373
  - - ">="
286
374
  - !ruby/object:Gem::Version
287
375
  version: '0'
288
376
  requirements: []
289
- rubyforge_project:
290
- rubygems_version: 2.5.1
291
- signing_key:
377
+ rubygems_version: 3.2.15
378
+ signing_key:
292
379
  specification_version: 4
293
380
  summary: Boleto Simples API wrapper.
294
381
  test_files:
295
382
  - spec/boletosimples/configuration_spec.rb
296
- - spec/boletosimples/extra_spec.rb
297
383
  - spec/boletosimples/last_request_spec.rb
298
384
  - spec/boletosimples/resources/bank_billet_account_spec.rb
385
+ - spec/boletosimples/resources/bank_billet_discharge_spec.rb
386
+ - spec/boletosimples/resources/bank_billet_payment_spec.rb
387
+ - spec/boletosimples/resources/bank_billet_remittance_spec.rb
299
388
  - spec/boletosimples/resources/bank_billet_spec.rb
389
+ - spec/boletosimples/resources/customer_import_spec.rb
300
390
  - spec/boletosimples/resources/customer_spec.rb
391
+ - spec/boletosimples/resources/customer_subscription_import_spec.rb
301
392
  - spec/boletosimples/resources/customer_subscription_spec.rb
302
393
  - spec/boletosimples/resources/discharge_spec.rb
394
+ - spec/boletosimples/resources/email_delivery_spec.rb
303
395
  - spec/boletosimples/resources/event_spec.rb
304
396
  - spec/boletosimples/resources/installment_spec.rb
305
- - spec/boletosimples/resources/partner/user_spec.rb
306
397
  - spec/boletosimples/resources/remittance_spec.rb
398
+ - spec/boletosimples/resources/sms_delivery_spec.rb
307
399
  - spec/boletosimples/resources/transactions_spec.rb
308
400
  - spec/boletosimples/resources/webhook_delivery_spec.rb
309
401
  - spec/boletosimples/resources/webhook_spec.rb
310
- - spec/fixtures/vcr_cassettes/configuration/client_credentials/invalid.yml
311
- - spec/fixtures/vcr_cassettes/configuration/client_credentials/valid.yml
312
- - spec/fixtures/vcr_cassettes/extra/userinfo/authenticated.yml
313
- - spec/fixtures/vcr_cassettes/extra/userinfo/not_authenticated.yml
402
+ - spec/fixtures/customer_imports.csv
403
+ - spec/fixtures/customer_subscription_imports.csv
404
+ - spec/fixtures/discharge.RET
314
405
  - spec/fixtures/vcr_cassettes/last_request/bank_billets.yml
315
- - spec/fixtures/vcr_cassettes/last_request/userinfo.yml
316
406
  - spec/fixtures/vcr_cassettes/resources/bank_billet/all.yml
317
- - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/failure.yml
318
407
  - spec/fixtures/vcr_cassettes/resources/bank_billet/cancel/success.yml
319
408
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_params.yml
320
409
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/invalid_root.yml
321
410
  - spec/fixtures/vcr_cassettes/resources/bank_billet/create/valid.yml
411
+ - spec/fixtures/vcr_cassettes/resources/bank_billet/duplicate/success.yml
322
412
  - spec/fixtures/vcr_cassettes/resources/bank_billet/find.yml
323
413
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/all.yml
324
414
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_params.yml
325
415
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/invalid_root.yml
326
416
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/create/valid.yml
327
417
  - spec/fixtures/vcr_cassettes/resources/bank_billet_account/find.yml
418
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_discharge/all.yml
419
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_payment/all.yml
420
+ - spec/fixtures/vcr_cassettes/resources/bank_billet_remittance/all.yml
328
421
  - spec/fixtures/vcr_cassettes/resources/customer/all.yml
329
422
  - spec/fixtures/vcr_cassettes/resources/customer/create/invalid_params.yml
330
423
  - spec/fixtures/vcr_cassettes/resources/customer/create/invalid_root.yml
331
424
  - spec/fixtures/vcr_cassettes/resources/customer/create/valid.yml
332
425
  - spec/fixtures/vcr_cassettes/resources/customer/find.yml
426
+ - spec/fixtures/vcr_cassettes/resources/customer_import/all.yml
427
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_params.yml
428
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/invalid_root.yml
429
+ - spec/fixtures/vcr_cassettes/resources/customer_import/create/valid.yml
430
+ - spec/fixtures/vcr_cassettes/resources/customer_import/find.yml
333
431
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/all.yml
334
432
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_params.yml
335
433
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/invalid_root.yml
336
434
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/create/valid.yml
337
435
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/find.yml
338
436
  - spec/fixtures/vcr_cassettes/resources/customer_subscription/next_charge.yml
437
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/all.yml
438
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_params.yml
439
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/invalid_root.yml
440
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/create/valid.yml
441
+ - spec/fixtures/vcr_cassettes/resources/customer_subscription_import/find.yml
339
442
  - spec/fixtures/vcr_cassettes/resources/discharge/all.yml
443
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_params.yml
444
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/invalid_root.yml
445
+ - spec/fixtures/vcr_cassettes/resources/discharge/create/valid.yml
446
+ - spec/fixtures/vcr_cassettes/resources/discharge/find.yml
447
+ - spec/fixtures/vcr_cassettes/resources/email_delivery/all.yml
340
448
  - spec/fixtures/vcr_cassettes/resources/event/all.yml
341
449
  - spec/fixtures/vcr_cassettes/resources/installment/all.yml
342
450
  - spec/fixtures/vcr_cassettes/resources/installment/create/invalid_params.yml
343
451
  - spec/fixtures/vcr_cassettes/resources/installment/create/invalid_root.yml
344
452
  - spec/fixtures/vcr_cassettes/resources/installment/create/valid.yml
345
453
  - spec/fixtures/vcr_cassettes/resources/installment/find.yml
346
- - spec/fixtures/vcr_cassettes/resources/partner/user/create.yml
347
454
  - spec/fixtures/vcr_cassettes/resources/remittance/all.yml
455
+ - spec/fixtures/vcr_cassettes/resources/sns_delivery/all.yml
348
456
  - spec/fixtures/vcr_cassettes/resources/transaction/all.yml
349
457
  - spec/fixtures/vcr_cassettes/resources/web_hook/all.yml
350
458
  - spec/fixtures/vcr_cassettes/resources/webhook_delivery/all.yml
351
- - spec/spec.opts
352
459
  - spec/spec_helper.rb
460
+ - spec/support/stub_env.rb
353
461
  - spec/support/vcr.rb