gocardless_pro 2.29.0 → 2.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gocardless_pro/client.rb +1 -1
  3. data/lib/gocardless_pro/resources/billing_request.rb +2 -0
  4. data/lib/gocardless_pro/resources/billing_request_flow.rb +4 -0
  5. data/lib/gocardless_pro/resources/block.rb +19 -9
  6. data/lib/gocardless_pro/resources/institution.rb +5 -1
  7. data/lib/gocardless_pro/resources/payer_authorisation.rb +4 -4
  8. data/lib/gocardless_pro/resources/redirect_flow.rb +4 -0
  9. data/lib/gocardless_pro/services/billing_request_flows_service.rb +1 -1
  10. data/lib/gocardless_pro/services/billing_requests_service.rb +40 -2
  11. data/lib/gocardless_pro/services/institutions_service.rb +1 -1
  12. data/lib/gocardless_pro/version.rb +1 -1
  13. data/spec/resources/billing_request_flow_spec.rb +14 -0
  14. data/spec/resources/billing_request_spec.rb +108 -0
  15. data/spec/resources/block_spec.rb +18 -1
  16. data/spec/resources/creditor_bank_account_spec.rb +2 -0
  17. data/spec/resources/customer_bank_account_spec.rb +2 -0
  18. data/spec/resources/customer_notification_spec.rb +2 -0
  19. data/spec/resources/customer_spec.rb +2 -0
  20. data/spec/resources/instalment_schedule_spec.rb +2 -0
  21. data/spec/resources/mandate_import_spec.rb +4 -0
  22. data/spec/resources/mandate_spec.rb +4 -0
  23. data/spec/resources/payer_authorisation_spec.rb +4 -0
  24. data/spec/resources/payment_spec.rb +4 -0
  25. data/spec/resources/redirect_flow_spec.rb +2 -0
  26. data/spec/resources/scenario_simulator_spec.rb +2 -0
  27. data/spec/resources/subscription_spec.rb +6 -0
  28. data/spec/resources/webhook_spec.rb +2 -0
  29. data/spec/services/billing_request_flows_service_spec.rb +14 -0
  30. data/spec/services/billing_requests_service_spec.rb +123 -0
  31. data/spec/services/blocks_service_spec.rb +18 -1
  32. data/spec/services/creditor_bank_accounts_service_spec.rb +2 -0
  33. data/spec/services/customer_bank_accounts_service_spec.rb +2 -0
  34. data/spec/services/customer_notifications_service_spec.rb +2 -0
  35. data/spec/services/customers_service_spec.rb +2 -0
  36. data/spec/services/instalment_schedules_service_spec.rb +2 -0
  37. data/spec/services/mandate_imports_service_spec.rb +4 -0
  38. data/spec/services/mandates_service_spec.rb +4 -0
  39. data/spec/services/payer_authorisations_service_spec.rb +4 -0
  40. data/spec/services/payments_service_spec.rb +4 -0
  41. data/spec/services/redirect_flows_service_spec.rb +2 -0
  42. data/spec/services/scenario_simulators_service_spec.rb +2 -0
  43. data/spec/services/subscriptions_service_spec.rb +6 -0
  44. data/spec/services/webhooks_service_spec.rb +2 -0
  45. metadata +7 -7
@@ -871,6 +871,7 @@ describe GoCardlessPro::Services::InstalmentSchedulesService do
871
871
  # /instalment_schedules/%v/actions/cancel
872
872
  stub_url = '/instalment_schedules/:identity/actions/cancel'.gsub(':identity', resource_id)
873
873
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
874
+
874
875
  body: {
875
876
  'instalment_schedules' => {
876
877
 
@@ -885,6 +886,7 @@ describe GoCardlessPro::Services::InstalmentSchedulesService do
885
886
  'total_amount' => 'total_amount-input',
886
887
  },
887
888
  }.to_json,
889
+
888
890
  headers: response_headers
889
891
  )
890
892
  end
@@ -325,6 +325,7 @@ describe GoCardlessPro::Services::MandateImportsService do
325
325
  # /mandate_imports/%v/actions/submit
326
326
  stub_url = '/mandate_imports/:identity/actions/submit'.gsub(':identity', resource_id)
327
327
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
328
+
328
329
  body: {
329
330
  'mandate_imports' => {
330
331
 
@@ -334,6 +335,7 @@ describe GoCardlessPro::Services::MandateImportsService do
334
335
  'status' => 'status-input',
335
336
  },
336
337
  }.to_json,
338
+
337
339
  headers: response_headers
338
340
  )
339
341
  end
@@ -394,6 +396,7 @@ describe GoCardlessPro::Services::MandateImportsService do
394
396
  # /mandate_imports/%v/actions/cancel
395
397
  stub_url = '/mandate_imports/:identity/actions/cancel'.gsub(':identity', resource_id)
396
398
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
399
+
397
400
  body: {
398
401
  'mandate_imports' => {
399
402
 
@@ -403,6 +406,7 @@ describe GoCardlessPro::Services::MandateImportsService do
403
406
  'status' => 'status-input',
404
407
  },
405
408
  }.to_json,
409
+
406
410
  headers: response_headers
407
411
  )
408
412
  end
@@ -675,6 +675,7 @@ describe GoCardlessPro::Services::MandatesService do
675
675
  # /mandates/%v/actions/cancel
676
676
  stub_url = '/mandates/:identity/actions/cancel'.gsub(':identity', resource_id)
677
677
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
678
+
678
679
  body: {
679
680
  'mandates' => {
680
681
 
@@ -689,6 +690,7 @@ describe GoCardlessPro::Services::MandatesService do
689
690
  'status' => 'status-input',
690
691
  },
691
692
  }.to_json,
693
+
692
694
  headers: response_headers
693
695
  )
694
696
  end
@@ -754,6 +756,7 @@ describe GoCardlessPro::Services::MandatesService do
754
756
  # /mandates/%v/actions/reinstate
755
757
  stub_url = '/mandates/:identity/actions/reinstate'.gsub(':identity', resource_id)
756
758
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
759
+
757
760
  body: {
758
761
  'mandates' => {
759
762
 
@@ -768,6 +771,7 @@ describe GoCardlessPro::Services::MandatesService do
768
771
  'status' => 'status-input',
769
772
  },
770
773
  }.to_json,
774
+
771
775
  headers: response_headers
772
776
  )
773
777
  end
@@ -412,6 +412,7 @@ describe GoCardlessPro::Services::PayerAuthorisationsService do
412
412
  # /payer_authorisations/%v/actions/submit
413
413
  stub_url = '/payer_authorisations/:identity/actions/submit'.gsub(':identity', resource_id)
414
414
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
415
+
415
416
  body: {
416
417
  'payer_authorisations' => {
417
418
 
@@ -425,6 +426,7 @@ describe GoCardlessPro::Services::PayerAuthorisationsService do
425
426
  'status' => 'status-input',
426
427
  },
427
428
  }.to_json,
429
+
428
430
  headers: response_headers
429
431
  )
430
432
  end
@@ -489,6 +491,7 @@ describe GoCardlessPro::Services::PayerAuthorisationsService do
489
491
  # /payer_authorisations/%v/actions/confirm
490
492
  stub_url = '/payer_authorisations/:identity/actions/confirm'.gsub(':identity', resource_id)
491
493
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
494
+
492
495
  body: {
493
496
  'payer_authorisations' => {
494
497
 
@@ -502,6 +505,7 @@ describe GoCardlessPro::Services::PayerAuthorisationsService do
502
505
  'status' => 'status-input',
503
506
  },
504
507
  }.to_json,
508
+
505
509
  headers: response_headers
506
510
  )
507
511
  end
@@ -743,6 +743,7 @@ describe GoCardlessPro::Services::PaymentsService do
743
743
  # /payments/%v/actions/cancel
744
744
  stub_url = '/payments/:identity/actions/cancel'.gsub(':identity', resource_id)
745
745
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
746
+
746
747
  body: {
747
748
  'payments' => {
748
749
 
@@ -761,6 +762,7 @@ describe GoCardlessPro::Services::PaymentsService do
761
762
  'status' => 'status-input',
762
763
  },
763
764
  }.to_json,
765
+
764
766
  headers: response_headers
765
767
  )
766
768
  end
@@ -830,6 +832,7 @@ describe GoCardlessPro::Services::PaymentsService do
830
832
  # /payments/%v/actions/retry
831
833
  stub_url = '/payments/:identity/actions/retry'.gsub(':identity', resource_id)
832
834
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
835
+
833
836
  body: {
834
837
  'payments' => {
835
838
 
@@ -848,6 +851,7 @@ describe GoCardlessPro::Services::PaymentsService do
848
851
  'status' => 'status-input',
849
852
  },
850
853
  }.to_json,
854
+
851
855
  headers: response_headers
852
856
  )
853
857
  end
@@ -374,6 +374,7 @@ describe GoCardlessPro::Services::RedirectFlowsService do
374
374
  # /redirect_flows/%v/actions/complete
375
375
  stub_url = '/redirect_flows/:identity/actions/complete'.gsub(':identity', resource_id)
376
376
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
377
+
377
378
  body: {
378
379
  'redirect_flows' => {
379
380
 
@@ -390,6 +391,7 @@ describe GoCardlessPro::Services::RedirectFlowsService do
390
391
  'success_redirect_url' => 'success_redirect_url-input',
391
392
  },
392
393
  }.to_json,
394
+
393
395
  headers: response_headers
394
396
  )
395
397
  end
@@ -18,12 +18,14 @@ describe GoCardlessPro::Services::ScenarioSimulatorsService do
18
18
  # /scenario_simulators/%v/actions/run
19
19
  stub_url = '/scenario_simulators/:identity/actions/run'.gsub(':identity', resource_id)
20
20
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
21
+
21
22
  body: {
22
23
  'scenario_simulators' => {
23
24
 
24
25
  'id' => 'id-input',
25
26
  },
26
27
  }.to_json,
28
+
27
29
  headers: response_headers
28
30
  )
29
31
  end
@@ -862,6 +862,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
862
862
  # /subscriptions/%v/actions/pause
863
863
  stub_url = '/subscriptions/:identity/actions/pause'.gsub(':identity', resource_id)
864
864
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
865
+
865
866
  body: {
866
867
  'subscriptions' => {
867
868
 
@@ -887,6 +888,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
887
888
  'upcoming_payments' => 'upcoming_payments-input',
888
889
  },
889
890
  }.to_json,
891
+
890
892
  headers: response_headers
891
893
  )
892
894
  end
@@ -963,6 +965,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
963
965
  # /subscriptions/%v/actions/resume
964
966
  stub_url = '/subscriptions/:identity/actions/resume'.gsub(':identity', resource_id)
965
967
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
968
+
966
969
  body: {
967
970
  'subscriptions' => {
968
971
 
@@ -988,6 +991,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
988
991
  'upcoming_payments' => 'upcoming_payments-input',
989
992
  },
990
993
  }.to_json,
994
+
991
995
  headers: response_headers
992
996
  )
993
997
  end
@@ -1064,6 +1068,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
1064
1068
  # /subscriptions/%v/actions/cancel
1065
1069
  stub_url = '/subscriptions/:identity/actions/cancel'.gsub(':identity', resource_id)
1066
1070
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
1071
+
1067
1072
  body: {
1068
1073
  'subscriptions' => {
1069
1074
 
@@ -1089,6 +1094,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
1089
1094
  'upcoming_payments' => 'upcoming_payments-input',
1090
1095
  },
1091
1096
  }.to_json,
1097
+
1092
1098
  headers: response_headers
1093
1099
  )
1094
1100
  end
@@ -465,6 +465,7 @@ describe GoCardlessPro::Services::WebhooksService do
465
465
  # /webhooks/%v/actions/retry
466
466
  stub_url = '/webhooks/:identity/actions/retry'.gsub(':identity', resource_id)
467
467
  stub_request(:post, /.*api.gocardless.com#{stub_url}/).to_return(
468
+
468
469
  body: {
469
470
  'webhooks' => {
470
471
 
@@ -483,6 +484,7 @@ describe GoCardlessPro::Services::WebhooksService do
483
484
  'url' => 'url-input',
484
485
  },
485
486
  }.to_json,
487
+
486
488
  headers: response_headers
487
489
  )
488
490
  end
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.29.0
4
+ version: 2.30.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-30 00:00:00.000000000 Z
11
+ date: 2022-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -128,7 +128,7 @@ dependencies:
128
128
  - - "<"
129
129
  - !ruby/object:Gem::Version
130
130
  version: '13'
131
- description:
131
+ description:
132
132
  email:
133
133
  - engineering@gocardless.com
134
134
  executables: []
@@ -294,7 +294,7 @@ homepage: https://github.com/gocardless/gocardless-pro-ruby
294
294
  licenses:
295
295
  - MIT
296
296
  metadata: {}
297
- post_install_message:
297
+ post_install_message:
298
298
  rdoc_options: []
299
299
  require_paths:
300
300
  - lib
@@ -309,8 +309,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
309
309
  - !ruby/object:Gem::Version
310
310
  version: '0'
311
311
  requirements: []
312
- rubygems_version: 3.2.22
313
- signing_key:
312
+ rubygems_version: 3.0.3.1
313
+ signing_key:
314
314
  specification_version: 4
315
315
  summary: A gem for calling the GoCardless Pro API
316
316
  test_files: