gocardless_pro 2.23.0 → 2.28.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +23 -4
  3. data/lib/gocardless_pro.rb +27 -0
  4. data/lib/gocardless_pro/api_service.rb +4 -0
  5. data/lib/gocardless_pro/client.rb +41 -1
  6. data/lib/gocardless_pro/error/authentication_error.rb +4 -0
  7. data/lib/gocardless_pro/error/permission_error.rb +4 -0
  8. data/lib/gocardless_pro/error/rate_limit_error.rb +4 -0
  9. data/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +12 -1
  10. data/lib/gocardless_pro/resources/bank_authorisation.rb +85 -0
  11. data/lib/gocardless_pro/resources/billing_request.rb +108 -0
  12. data/lib/gocardless_pro/resources/billing_request_flow.rb +72 -0
  13. data/lib/gocardless_pro/resources/billing_request_template.rb +68 -0
  14. data/lib/gocardless_pro/resources/creditor.rb +2 -3
  15. data/lib/gocardless_pro/resources/event.rb +12 -0
  16. data/lib/gocardless_pro/resources/institution.rb +45 -0
  17. data/lib/gocardless_pro/resources/payer_authorisation.rb +131 -0
  18. data/lib/gocardless_pro/resources/payout_item.rb +4 -0
  19. data/lib/gocardless_pro/resources/scenario_simulator.rb +42 -0
  20. data/lib/gocardless_pro/resources/tax_rate.rb +3 -0
  21. data/lib/gocardless_pro/resources/webhook.rb +62 -0
  22. data/lib/gocardless_pro/services/bank_authorisations_service.rb +80 -0
  23. data/lib/gocardless_pro/services/billing_request_flows_service.rb +70 -0
  24. data/lib/gocardless_pro/services/billing_request_templates_service.rb +131 -0
  25. data/lib/gocardless_pro/services/billing_requests_service.rb +352 -0
  26. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +0 -4
  27. data/lib/gocardless_pro/services/creditors_service.rb +0 -2
  28. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +0 -4
  29. data/lib/gocardless_pro/services/customers_service.rb +0 -2
  30. data/lib/gocardless_pro/services/instalment_schedules_service.rb +0 -6
  31. data/lib/gocardless_pro/services/institutions_service.rb +56 -0
  32. data/lib/gocardless_pro/services/mandate_imports_service.rb +0 -6
  33. data/lib/gocardless_pro/services/mandates_service.rb +0 -6
  34. data/lib/gocardless_pro/services/payer_authorisations_service.rb +202 -0
  35. data/lib/gocardless_pro/services/payments_service.rb +0 -6
  36. data/lib/gocardless_pro/services/redirect_flows_service.rb +0 -4
  37. data/lib/gocardless_pro/services/refunds_service.rb +0 -2
  38. data/lib/gocardless_pro/services/scenario_simulators_service.rb +170 -0
  39. data/lib/gocardless_pro/services/subscriptions_service.rb +10 -13
  40. data/lib/gocardless_pro/services/webhooks_service.rb +111 -0
  41. data/lib/gocardless_pro/version.rb +1 -1
  42. data/spec/api_service_spec.rb +12 -1
  43. data/spec/middlewares/raise_gocardless_errors_spec.rb +30 -0
  44. data/spec/resources/bank_authorisation_spec.rb +259 -0
  45. data/spec/resources/billing_request_flow_spec.rb +219 -0
  46. data/spec/resources/billing_request_spec.rb +782 -0
  47. data/spec/resources/billing_request_template_spec.rb +502 -0
  48. data/spec/resources/institution_spec.rb +103 -0
  49. data/spec/resources/payer_authorisation_spec.rb +418 -0
  50. data/spec/resources/scenario_simulator_spec.rb +63 -0
  51. data/spec/resources/webhook_spec.rb +323 -0
  52. data/spec/services/bank_authorisations_service_spec.rb +353 -0
  53. data/spec/services/billing_request_flows_service_spec.rb +253 -0
  54. data/spec/services/billing_request_templates_service_spec.rb +789 -0
  55. data/spec/services/billing_requests_service_spec.rb +1082 -0
  56. data/spec/services/creditor_bank_accounts_service_spec.rb +0 -13
  57. data/spec/services/creditors_service_spec.rb +0 -13
  58. data/spec/services/customer_bank_accounts_service_spec.rb +0 -13
  59. data/spec/services/customers_service_spec.rb +0 -13
  60. data/spec/services/instalment_schedules_service_spec.rb +0 -26
  61. data/spec/services/institutions_service_spec.rb +223 -0
  62. data/spec/services/mandate_imports_service_spec.rb +0 -13
  63. data/spec/services/mandates_service_spec.rb +0 -13
  64. data/spec/services/payer_authorisations_service_spec.rb +559 -0
  65. data/spec/services/payments_service_spec.rb +0 -13
  66. data/spec/services/redirect_flows_service_spec.rb +0 -13
  67. data/spec/services/refunds_service_spec.rb +0 -13
  68. data/spec/services/scenario_simulators_service_spec.rb +74 -0
  69. data/spec/services/subscriptions_service_spec.rb +0 -13
  70. data/spec/services/webhooks_service_spec.rb +545 -0
  71. metadata +54 -3
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gocardless_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.23.0
4
+ version: 2.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-14 00:00:00.000000000 Z
11
+ date: 2021-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -151,15 +151,22 @@ files:
151
151
  - lib/gocardless_pro/client.rb
152
152
  - lib/gocardless_pro/error.rb
153
153
  - lib/gocardless_pro/error/api_error.rb
154
+ - lib/gocardless_pro/error/authentication_error.rb
154
155
  - lib/gocardless_pro/error/gocardless_error.rb
155
156
  - lib/gocardless_pro/error/invalid_api_usage_error.rb
156
157
  - lib/gocardless_pro/error/invalid_state_error.rb
158
+ - lib/gocardless_pro/error/permission_error.rb
159
+ - lib/gocardless_pro/error/rate_limit_error.rb
157
160
  - lib/gocardless_pro/error/validation_error.rb
158
161
  - lib/gocardless_pro/list_response.rb
159
162
  - lib/gocardless_pro/middlewares/raise_gocardless_errors.rb
160
163
  - lib/gocardless_pro/paginator.rb
161
164
  - lib/gocardless_pro/request.rb
165
+ - lib/gocardless_pro/resources/bank_authorisation.rb
162
166
  - lib/gocardless_pro/resources/bank_details_lookup.rb
167
+ - lib/gocardless_pro/resources/billing_request.rb
168
+ - lib/gocardless_pro/resources/billing_request_flow.rb
169
+ - lib/gocardless_pro/resources/billing_request_template.rb
163
170
  - lib/gocardless_pro/resources/creditor.rb
164
171
  - lib/gocardless_pro/resources/creditor_bank_account.rb
165
172
  - lib/gocardless_pro/resources/currency_exchange_rate.rb
@@ -168,20 +175,28 @@ files:
168
175
  - lib/gocardless_pro/resources/customer_notification.rb
169
176
  - lib/gocardless_pro/resources/event.rb
170
177
  - lib/gocardless_pro/resources/instalment_schedule.rb
178
+ - lib/gocardless_pro/resources/institution.rb
171
179
  - lib/gocardless_pro/resources/mandate.rb
172
180
  - lib/gocardless_pro/resources/mandate_import.rb
173
181
  - lib/gocardless_pro/resources/mandate_import_entry.rb
174
182
  - lib/gocardless_pro/resources/mandate_pdf.rb
183
+ - lib/gocardless_pro/resources/payer_authorisation.rb
175
184
  - lib/gocardless_pro/resources/payment.rb
176
185
  - lib/gocardless_pro/resources/payout.rb
177
186
  - lib/gocardless_pro/resources/payout_item.rb
178
187
  - lib/gocardless_pro/resources/redirect_flow.rb
179
188
  - lib/gocardless_pro/resources/refund.rb
189
+ - lib/gocardless_pro/resources/scenario_simulator.rb
180
190
  - lib/gocardless_pro/resources/subscription.rb
181
191
  - lib/gocardless_pro/resources/tax_rate.rb
192
+ - lib/gocardless_pro/resources/webhook.rb
182
193
  - lib/gocardless_pro/response.rb
194
+ - lib/gocardless_pro/services/bank_authorisations_service.rb
183
195
  - lib/gocardless_pro/services/bank_details_lookups_service.rb
184
196
  - lib/gocardless_pro/services/base_service.rb
197
+ - lib/gocardless_pro/services/billing_request_flows_service.rb
198
+ - lib/gocardless_pro/services/billing_request_templates_service.rb
199
+ - lib/gocardless_pro/services/billing_requests_service.rb
185
200
  - lib/gocardless_pro/services/creditor_bank_accounts_service.rb
186
201
  - lib/gocardless_pro/services/creditors_service.rb
187
202
  - lib/gocardless_pro/services/currency_exchange_rates_service.rb
@@ -190,17 +205,21 @@ files:
190
205
  - lib/gocardless_pro/services/customers_service.rb
191
206
  - lib/gocardless_pro/services/events_service.rb
192
207
  - lib/gocardless_pro/services/instalment_schedules_service.rb
208
+ - lib/gocardless_pro/services/institutions_service.rb
193
209
  - lib/gocardless_pro/services/mandate_import_entries_service.rb
194
210
  - lib/gocardless_pro/services/mandate_imports_service.rb
195
211
  - lib/gocardless_pro/services/mandate_pdfs_service.rb
196
212
  - lib/gocardless_pro/services/mandates_service.rb
213
+ - lib/gocardless_pro/services/payer_authorisations_service.rb
197
214
  - lib/gocardless_pro/services/payments_service.rb
198
215
  - lib/gocardless_pro/services/payout_items_service.rb
199
216
  - lib/gocardless_pro/services/payouts_service.rb
200
217
  - lib/gocardless_pro/services/redirect_flows_service.rb
201
218
  - lib/gocardless_pro/services/refunds_service.rb
219
+ - lib/gocardless_pro/services/scenario_simulators_service.rb
202
220
  - lib/gocardless_pro/services/subscriptions_service.rb
203
221
  - lib/gocardless_pro/services/tax_rates_service.rb
222
+ - lib/gocardless_pro/services/webhooks_service.rb
204
223
  - lib/gocardless_pro/version.rb
205
224
  - lib/gocardless_pro/webhook.rb
206
225
  - spec/api_response_spec.rb
@@ -208,7 +227,11 @@ files:
208
227
  - spec/client_spec.rb
209
228
  - spec/error_spec.rb
210
229
  - spec/middlewares/raise_gocardless_errors_spec.rb
230
+ - spec/resources/bank_authorisation_spec.rb
211
231
  - spec/resources/bank_details_lookup_spec.rb
232
+ - spec/resources/billing_request_flow_spec.rb
233
+ - spec/resources/billing_request_spec.rb
234
+ - spec/resources/billing_request_template_spec.rb
212
235
  - spec/resources/creditor_bank_account_spec.rb
213
236
  - spec/resources/creditor_spec.rb
214
237
  - spec/resources/currency_exchange_rate_spec.rb
@@ -217,19 +240,27 @@ files:
217
240
  - spec/resources/customer_spec.rb
218
241
  - spec/resources/event_spec.rb
219
242
  - spec/resources/instalment_schedule_spec.rb
243
+ - spec/resources/institution_spec.rb
220
244
  - spec/resources/mandate_import_entry_spec.rb
221
245
  - spec/resources/mandate_import_spec.rb
222
246
  - spec/resources/mandate_pdf_spec.rb
223
247
  - spec/resources/mandate_spec.rb
248
+ - spec/resources/payer_authorisation_spec.rb
224
249
  - spec/resources/payment_spec.rb
225
250
  - spec/resources/payout_item_spec.rb
226
251
  - spec/resources/payout_spec.rb
227
252
  - spec/resources/redirect_flow_spec.rb
228
253
  - spec/resources/refund_spec.rb
254
+ - spec/resources/scenario_simulator_spec.rb
229
255
  - spec/resources/subscription_spec.rb
230
256
  - spec/resources/tax_rate_spec.rb
257
+ - spec/resources/webhook_spec.rb
231
258
  - spec/response_spec.rb
259
+ - spec/services/bank_authorisations_service_spec.rb
232
260
  - spec/services/bank_details_lookups_service_spec.rb
261
+ - spec/services/billing_request_flows_service_spec.rb
262
+ - spec/services/billing_request_templates_service_spec.rb
263
+ - spec/services/billing_requests_service_spec.rb
233
264
  - spec/services/creditor_bank_accounts_service_spec.rb
234
265
  - spec/services/creditors_service_spec.rb
235
266
  - spec/services/currency_exchange_rates_service_spec.rb
@@ -238,17 +269,21 @@ files:
238
269
  - spec/services/customers_service_spec.rb
239
270
  - spec/services/events_service_spec.rb
240
271
  - spec/services/instalment_schedules_service_spec.rb
272
+ - spec/services/institutions_service_spec.rb
241
273
  - spec/services/mandate_import_entries_service_spec.rb
242
274
  - spec/services/mandate_imports_service_spec.rb
243
275
  - spec/services/mandate_pdfs_service_spec.rb
244
276
  - spec/services/mandates_service_spec.rb
277
+ - spec/services/payer_authorisations_service_spec.rb
245
278
  - spec/services/payments_service_spec.rb
246
279
  - spec/services/payout_items_service_spec.rb
247
280
  - spec/services/payouts_service_spec.rb
248
281
  - spec/services/redirect_flows_service_spec.rb
249
282
  - spec/services/refunds_service_spec.rb
283
+ - spec/services/scenario_simulators_service_spec.rb
250
284
  - spec/services/subscriptions_service_spec.rb
251
285
  - spec/services/tax_rates_service_spec.rb
286
+ - spec/services/webhooks_service_spec.rb
252
287
  - spec/spec_helper.rb
253
288
  - spec/webhook_spec.rb
254
289
  homepage: https://github.com/gocardless/gocardless-pro-ruby
@@ -270,7 +305,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
270
305
  - !ruby/object:Gem::Version
271
306
  version: '0'
272
307
  requirements: []
273
- rubygems_version: 3.1.2
308
+ rubygems_version: 3.2.3
274
309
  signing_key:
275
310
  specification_version: 4
276
311
  summary: A gem for calling the GoCardless Pro API
@@ -280,7 +315,11 @@ test_files:
280
315
  - spec/client_spec.rb
281
316
  - spec/error_spec.rb
282
317
  - spec/middlewares/raise_gocardless_errors_spec.rb
318
+ - spec/resources/bank_authorisation_spec.rb
283
319
  - spec/resources/bank_details_lookup_spec.rb
320
+ - spec/resources/billing_request_flow_spec.rb
321
+ - spec/resources/billing_request_spec.rb
322
+ - spec/resources/billing_request_template_spec.rb
284
323
  - spec/resources/creditor_bank_account_spec.rb
285
324
  - spec/resources/creditor_spec.rb
286
325
  - spec/resources/currency_exchange_rate_spec.rb
@@ -289,19 +328,27 @@ test_files:
289
328
  - spec/resources/customer_spec.rb
290
329
  - spec/resources/event_spec.rb
291
330
  - spec/resources/instalment_schedule_spec.rb
331
+ - spec/resources/institution_spec.rb
292
332
  - spec/resources/mandate_import_entry_spec.rb
293
333
  - spec/resources/mandate_import_spec.rb
294
334
  - spec/resources/mandate_pdf_spec.rb
295
335
  - spec/resources/mandate_spec.rb
336
+ - spec/resources/payer_authorisation_spec.rb
296
337
  - spec/resources/payment_spec.rb
297
338
  - spec/resources/payout_item_spec.rb
298
339
  - spec/resources/payout_spec.rb
299
340
  - spec/resources/redirect_flow_spec.rb
300
341
  - spec/resources/refund_spec.rb
342
+ - spec/resources/scenario_simulator_spec.rb
301
343
  - spec/resources/subscription_spec.rb
302
344
  - spec/resources/tax_rate_spec.rb
345
+ - spec/resources/webhook_spec.rb
303
346
  - spec/response_spec.rb
347
+ - spec/services/bank_authorisations_service_spec.rb
304
348
  - spec/services/bank_details_lookups_service_spec.rb
349
+ - spec/services/billing_request_flows_service_spec.rb
350
+ - spec/services/billing_request_templates_service_spec.rb
351
+ - spec/services/billing_requests_service_spec.rb
305
352
  - spec/services/creditor_bank_accounts_service_spec.rb
306
353
  - spec/services/creditors_service_spec.rb
307
354
  - spec/services/currency_exchange_rates_service_spec.rb
@@ -310,16 +357,20 @@ test_files:
310
357
  - spec/services/customers_service_spec.rb
311
358
  - spec/services/events_service_spec.rb
312
359
  - spec/services/instalment_schedules_service_spec.rb
360
+ - spec/services/institutions_service_spec.rb
313
361
  - spec/services/mandate_import_entries_service_spec.rb
314
362
  - spec/services/mandate_imports_service_spec.rb
315
363
  - spec/services/mandate_pdfs_service_spec.rb
316
364
  - spec/services/mandates_service_spec.rb
365
+ - spec/services/payer_authorisations_service_spec.rb
317
366
  - spec/services/payments_service_spec.rb
318
367
  - spec/services/payout_items_service_spec.rb
319
368
  - spec/services/payouts_service_spec.rb
320
369
  - spec/services/redirect_flows_service_spec.rb
321
370
  - spec/services/refunds_service_spec.rb
371
+ - spec/services/scenario_simulators_service_spec.rb
322
372
  - spec/services/subscriptions_service_spec.rb
323
373
  - spec/services/tax_rates_service_spec.rb
374
+ - spec/services/webhooks_service_spec.rb
324
375
  - spec/spec_helper.rb
325
376
  - spec/webhook_spec.rb