gocardless_pro 2.41.0 → 2.41.1

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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/lib/gocardless_pro/api_service.rb +4 -5
  3. data/lib/gocardless_pro/client.rb +3 -3
  4. data/lib/gocardless_pro/error/invalid_state_error.rb +1 -0
  5. data/lib/gocardless_pro/error.rb +1 -0
  6. data/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +7 -9
  7. data/lib/gocardless_pro/request.rb +5 -7
  8. data/lib/gocardless_pro/resources/bank_authorisation.rb +0 -2
  9. data/lib/gocardless_pro/resources/bank_details_lookup.rb +0 -2
  10. data/lib/gocardless_pro/resources/billing_request.rb +0 -2
  11. data/lib/gocardless_pro/resources/billing_request_flow.rb +0 -2
  12. data/lib/gocardless_pro/resources/billing_request_template.rb +0 -2
  13. data/lib/gocardless_pro/resources/block.rb +0 -2
  14. data/lib/gocardless_pro/resources/creditor.rb +0 -2
  15. data/lib/gocardless_pro/resources/creditor_bank_account.rb +0 -2
  16. data/lib/gocardless_pro/resources/currency_exchange_rate.rb +0 -2
  17. data/lib/gocardless_pro/resources/customer.rb +0 -2
  18. data/lib/gocardless_pro/resources/customer_bank_account.rb +0 -2
  19. data/lib/gocardless_pro/resources/customer_notification.rb +0 -2
  20. data/lib/gocardless_pro/resources/event.rb +0 -2
  21. data/lib/gocardless_pro/resources/instalment_schedule.rb +0 -2
  22. data/lib/gocardless_pro/resources/institution.rb +0 -2
  23. data/lib/gocardless_pro/resources/mandate.rb +0 -2
  24. data/lib/gocardless_pro/resources/mandate_import.rb +0 -2
  25. data/lib/gocardless_pro/resources/mandate_import_entry.rb +0 -2
  26. data/lib/gocardless_pro/resources/mandate_pdf.rb +0 -2
  27. data/lib/gocardless_pro/resources/payer_authorisation.rb +0 -2
  28. data/lib/gocardless_pro/resources/payment.rb +0 -2
  29. data/lib/gocardless_pro/resources/payout.rb +0 -2
  30. data/lib/gocardless_pro/resources/payout_item.rb +0 -2
  31. data/lib/gocardless_pro/resources/redirect_flow.rb +0 -2
  32. data/lib/gocardless_pro/resources/refund.rb +0 -2
  33. data/lib/gocardless_pro/resources/scenario_simulator.rb +0 -2
  34. data/lib/gocardless_pro/resources/scheme_identifier.rb +0 -2
  35. data/lib/gocardless_pro/resources/subscription.rb +0 -2
  36. data/lib/gocardless_pro/resources/tax_rate.rb +0 -2
  37. data/lib/gocardless_pro/resources/verification_detail.rb +0 -2
  38. data/lib/gocardless_pro/resources/webhook.rb +0 -2
  39. data/lib/gocardless_pro/services/bank_authorisations_service.rb +3 -1
  40. data/lib/gocardless_pro/services/billing_request_flows_service.rb +3 -1
  41. data/lib/gocardless_pro/services/billing_request_templates_service.rb +6 -2
  42. data/lib/gocardless_pro/services/billing_requests_service.rb +27 -9
  43. data/lib/gocardless_pro/services/blocks_service.rb +9 -3
  44. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +6 -2
  45. data/lib/gocardless_pro/services/creditors_service.rb +9 -3
  46. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +9 -3
  47. data/lib/gocardless_pro/services/customer_notifications_service.rb +3 -1
  48. data/lib/gocardless_pro/services/customers_service.rb +9 -3
  49. data/lib/gocardless_pro/services/events_service.rb +3 -1
  50. data/lib/gocardless_pro/services/instalment_schedules_service.rb +9 -3
  51. data/lib/gocardless_pro/services/mandate_imports_service.rb +9 -3
  52. data/lib/gocardless_pro/services/mandates_service.rb +12 -4
  53. data/lib/gocardless_pro/services/payer_authorisations_service.rb +12 -4
  54. data/lib/gocardless_pro/services/payments_service.rb +12 -4
  55. data/lib/gocardless_pro/services/payouts_service.rb +6 -2
  56. data/lib/gocardless_pro/services/redirect_flows_service.rb +6 -2
  57. data/lib/gocardless_pro/services/refunds_service.rb +6 -2
  58. data/lib/gocardless_pro/services/scenario_simulators_service.rb +3 -1
  59. data/lib/gocardless_pro/services/scheme_identifiers_service.rb +3 -1
  60. data/lib/gocardless_pro/services/subscriptions_service.rb +15 -5
  61. data/lib/gocardless_pro/services/tax_rates_service.rb +3 -1
  62. data/lib/gocardless_pro/services/webhooks_service.rb +6 -2
  63. data/lib/gocardless_pro/version.rb +1 -2
  64. data/lib/gocardless_pro/webhook.rb +5 -4
  65. data/lib/gocardless_pro.rb +2 -4
  66. metadata +5 -195
  67. data/.github/workflows/tests.yml +0 -40
  68. data/.gitignore +0 -1
  69. data/.rspec +0 -2
  70. data/.rubocop.yml +0 -5
  71. data/.travis.yml +0 -10
  72. data/LICENSE.txt +0 -22
  73. data/demo.rb +0 -9
  74. data/gocardless_pro.gemspec +0 -39
  75. data/spec/api_response_spec.rb +0 -28
  76. data/spec/api_service_spec.rb +0 -188
  77. data/spec/client_spec.rb +0 -19
  78. data/spec/error_spec.rb +0 -53
  79. data/spec/middlewares/raise_gocardless_errors_spec.rb +0 -127
  80. data/spec/resources/bank_authorisation_spec.rb +0 -259
  81. data/spec/resources/bank_details_lookup_spec.rb +0 -121
  82. data/spec/resources/billing_request_flow_spec.rb +0 -257
  83. data/spec/resources/billing_request_spec.rb +0 -962
  84. data/spec/resources/billing_request_template_spec.rb +0 -515
  85. data/spec/resources/block_spec.rb +0 -577
  86. data/spec/resources/creditor_bank_account_spec.rb +0 -472
  87. data/spec/resources/creditor_spec.rb +0 -659
  88. data/spec/resources/currency_exchange_rate_spec.rb +0 -103
  89. data/spec/resources/customer_bank_account_spec.rb +0 -509
  90. data/spec/resources/customer_notification_spec.rb +0 -75
  91. data/spec/resources/customer_spec.rb +0 -616
  92. data/spec/resources/event_spec.rb +0 -210
  93. data/spec/resources/instalment_schedule_spec.rb +0 -636
  94. data/spec/resources/institution_spec.rb +0 -113
  95. data/spec/resources/mandate_import_entry_spec.rb +0 -206
  96. data/spec/resources/mandate_import_spec.rb +0 -344
  97. data/spec/resources/mandate_pdf_spec.rb +0 -117
  98. data/spec/resources/mandate_spec.rb +0 -600
  99. data/spec/resources/payer_authorisation_spec.rb +0 -422
  100. data/spec/resources/payment_spec.rb +0 -617
  101. data/spec/resources/payout_item_spec.rb +0 -101
  102. data/spec/resources/payout_spec.rb +0 -284
  103. data/spec/resources/redirect_flow_spec.rb +0 -347
  104. data/spec/resources/refund_spec.rb +0 -409
  105. data/spec/resources/scenario_simulator_spec.rb +0 -65
  106. data/spec/resources/scheme_identifier_spec.rb +0 -484
  107. data/spec/resources/subscription_spec.rb +0 -828
  108. data/spec/resources/tax_rate_spec.rb +0 -198
  109. data/spec/resources/verification_detail_spec.rb +0 -145
  110. data/spec/resources/webhook_spec.rb +0 -325
  111. data/spec/response_spec.rb +0 -34
  112. data/spec/services/bank_authorisations_service_spec.rb +0 -353
  113. data/spec/services/bank_details_lookups_service_spec.rb +0 -144
  114. data/spec/services/billing_request_flows_service_spec.rb +0 -291
  115. data/spec/services/billing_request_templates_service_spec.rb +0 -806
  116. data/spec/services/billing_requests_service_spec.rb +0 -1288
  117. data/spec/services/blocks_service_spec.rb +0 -840
  118. data/spec/services/creditor_bank_accounts_service_spec.rb +0 -725
  119. data/spec/services/creditors_service_spec.rb +0 -977
  120. data/spec/services/currency_exchange_rates_service_spec.rb +0 -223
  121. data/spec/services/customer_bank_accounts_service_spec.rb +0 -787
  122. data/spec/services/customer_notifications_service_spec.rb +0 -86
  123. data/spec/services/customers_service_spec.rb +0 -922
  124. data/spec/services/events_service_spec.rb +0 -401
  125. data/spec/services/instalment_schedules_service_spec.rb +0 -945
  126. data/spec/services/institutions_service_spec.rb +0 -241
  127. data/spec/services/mandate_import_entries_service_spec.rb +0 -345
  128. data/spec/services/mandate_imports_service_spec.rb +0 -460
  129. data/spec/services/mandate_pdfs_service_spec.rb +0 -140
  130. data/spec/services/mandates_service_spec.rb +0 -893
  131. data/spec/services/payer_authorisations_service_spec.rb +0 -563
  132. data/spec/services/payments_service_spec.rb +0 -914
  133. data/spec/services/payout_items_service_spec.rb +0 -221
  134. data/spec/services/payouts_service_spec.rb +0 -520
  135. data/spec/services/redirect_flows_service_spec.rb +0 -452
  136. data/spec/services/refunds_service_spec.rb +0 -668
  137. data/spec/services/scenario_simulators_service_spec.rb +0 -76
  138. data/spec/services/scheme_identifiers_service_spec.rb +0 -754
  139. data/spec/services/subscriptions_service_spec.rb +0 -1164
  140. data/spec/services/tax_rates_service_spec.rb +0 -381
  141. data/spec/services/verification_details_service_spec.rb +0 -168
  142. data/spec/services/webhooks_service_spec.rb +0 -547
  143. data/spec/spec_helper.rb +0 -90
  144. data/spec/webhook_spec.rb +0 -122
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54e49d4ec8bdde6078ef0bef2d7b64552070a6114fc7eb5073ad9df5b8346ad7
4
- data.tar.gz: 4e7b1b362161c3f84fba2d2de48a08cf9d3168417c5f96c630c13f8cb9418a06
3
+ metadata.gz: 8e9725480d2dc2fc482dae8257c5f426aed030db8f58f51d074e9ddcdbe862de
4
+ data.tar.gz: a5811ee88da9fc7ef0e05c22978d4a47b85c25ec99c85bacb03f61deaa1363e6
5
5
  SHA512:
6
- metadata.gz: 785d50c105361f93a7a0be17ce38f09fc19ebc5b3738eeba6b0aa82212336c61e113b875e1b575c60534c9cdff764f1ce0710a131eeaa1a767d0667a757ca1d6
7
- data.tar.gz: 0d0e24924d3e6f1dcfc9353b53ed5124600be89a62744899389c0afb99598d93b9678b85b0054c49174a94097c5cae6a0e59e1cd56ab17e355622ee028fce40f
6
+ metadata.gz: fd894ee1d6988315558c652f2f9bc7cb91f81cb2ffa12c3f379be7e6737f303d329e0056d8b1bc6f2e2f50688623cdfa23499bf5ceec4417b1ab16d33b9a5b6c
7
+ data.tar.gz: 05f5e838a611c7ba37d406ccb66e2df50b6f1a30cae552c7fcdbf9b62b59c4b579609008e94b158197a46fd0b3a5fa9dcffd45971d79fb4d040b87989ba49aa9
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -35,9 +33,9 @@ module GoCardlessPro
35
33
  @headers['Authorization'] = "Bearer #{token}"
36
34
  @on_idempotency_conflict = options[:on_idempotency_conflict] || :fetch
37
35
 
38
- unless %i[fetch raise].include?(@on_idempotency_conflict)
39
- raise ArgumentError, 'Unknown mode for :on_idempotency_conflict'
40
- end
36
+ return if %i[fetch raise].include?(@on_idempotency_conflict)
37
+
38
+ raise ArgumentError, 'Unknown mode for :on_idempotency_conflict'
41
39
  end
42
40
 
43
41
  # Make a request to the API
@@ -47,6 +45,7 @@ module GoCardlessPro
47
45
  # @param options [Hash] the options hash
48
46
  def make_request(method, path, options = {})
49
47
  raise ArgumentError, 'options must be a hash' unless options.is_a?(Hash)
48
+
50
49
  options[:headers] ||= {}
51
50
  options[:headers] = @headers.merge(options[:headers])
52
51
  Request.new(@connection, method, @path_prefix + path, options).request
@@ -205,10 +205,10 @@ module GoCardlessPro
205
205
  {
206
206
  default_headers: {
207
207
  'GoCardless-Version' => '2015-07-06',
208
- 'User-Agent' => user_agent.to_s,
208
+ 'User-Agent' => "#{user_agent}",
209
209
  'Content-Type' => 'application/json',
210
210
  'GoCardless-Client-Library' => 'gocardless-pro-ruby',
211
- 'GoCardless-Client-Version' => '2.41.0',
211
+ 'GoCardless-Client-Version' => '2.41.1',
212
212
  },
213
213
  }
214
214
  end
@@ -229,7 +229,7 @@ module GoCardlessPro
229
229
  comment = [
230
230
  "#{ruby_engine}/#{ruby_version}",
231
231
  "#{RUBY_ENGINE}/#{interpreter_version}",
232
- RUBY_PLATFORM.to_s,
232
+ "#{RUBY_PLATFORM}",
233
233
  ]
234
234
  comment << "faraday/#{Faraday::VERSION}"
235
235
  "#{gem_info} #{comment.join(' ')}"
@@ -10,6 +10,7 @@ module GoCardlessPro
10
10
 
11
11
  def conflicting_resource_id
12
12
  return unless idempotent_creation_conflict?
13
+
13
14
  idempotent_creation_conflict_error['links'][CONFLICTING_RESOURCE_ID]
14
15
  end
15
16
 
@@ -7,6 +7,7 @@ module GoCardlessPro
7
7
  #  @param error the error from the API
8
8
  def initialize(error)
9
9
  raise ArgumentError, 'GoCardless errors expect a hash' unless error.is_a?(Hash)
10
+
10
11
  @error = error
11
12
  end
12
13
 
@@ -5,18 +5,16 @@ module GoCardlessPro
5
5
  CLIENT_ERROR_STATUSES = 400..500
6
6
 
7
7
  def on_complete(env)
8
- if !json?(env) || API_ERROR_STATUSES.include?(env.status)
9
- raise ApiError, generate_error_data(env)
10
- end
8
+ raise ApiError, generate_error_data(env) if !json?(env) || API_ERROR_STATUSES.include?(env.status)
11
9
 
12
- if CLIENT_ERROR_STATUSES.include?(env.status)
13
- json_body ||= JSON.parse(env.body) unless env.body.empty?
14
- error_type = json_body['error']['type']
10
+ return unless CLIENT_ERROR_STATUSES.include?(env.status)
15
11
 
16
- error_class = error_class_for_status(env.status) || error_class_for_type(error_type)
12
+ json_body ||= JSON.parse(env.body) unless env.body.empty?
13
+ error_type = json_body['error']['type']
17
14
 
18
- raise(error_class, json_body['error'])
19
- end
15
+ error_class = error_class_for_status(env.status) || error_class_for_type(error_type)
16
+
17
+ raise(error_class, json_body['error'])
20
18
  end
21
19
 
22
20
  private
@@ -52,15 +52,13 @@ module GoCardlessPro
52
52
 
53
53
  begin
54
54
  yield
55
- rescue => exception
55
+ rescue StandardError => e
56
56
  requests_attempted += 1
57
57
 
58
- if requests_attempted < total_requests_allowed && should_retry?(exception)
59
- sleep(RETRY_DELAY)
60
- retry
61
- else
62
- raise exception
63
- end
58
+ raise e unless requests_attempted < total_requests_allowed && should_retry?(e)
59
+
60
+ sleep(RETRY_DELAY)
61
+ retry
64
62
  end
65
63
  end
66
64
 
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -1,5 +1,3 @@
1
- # encoding: utf-8
2
-
3
1
  #
4
2
  # This client is automatically generated from a template and JSON schema definition.
5
3
  # See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
@@ -16,7 +16,9 @@ module GoCardlessPro
16
16
  # @param identity # Unique identifier, beginning with "BAU".
17
17
  # @param options [Hash] parameters as a hash, under a params key.
18
18
  def get(identity, options = {})
19
- path = sub_url('/bank_authorisations/:identity', 'identity' => identity)
19
+ path = sub_url('/bank_authorisations/:identity', {
20
+ 'identity' => identity,
21
+ })
20
22
 
21
23
  options[:retry_failures] = true
22
24
 
@@ -37,7 +37,9 @@ module GoCardlessPro
37
37
  # @param identity # Unique identifier, beginning with "BRF".
38
38
  # @param options [Hash] parameters as a hash, under a params key.
39
39
  def initialise(identity, options = {})
40
- path = sub_url('/billing_request_flows/:identity/actions/initialise', 'identity' => identity)
40
+ path = sub_url('/billing_request_flows/:identity/actions/initialise', {
41
+ 'identity' => identity,
42
+ })
41
43
 
42
44
  params = options.delete(:params) || {}
43
45
  options[:params] = {}
@@ -45,7 +45,9 @@ module GoCardlessPro
45
45
  # @param identity # Unique identifier, beginning with "BRT".
46
46
  # @param options [Hash] parameters as a hash, under a params key.
47
47
  def get(identity, options = {})
48
- path = sub_url('/billing_request_templates/:identity', 'identity' => identity)
48
+ path = sub_url('/billing_request_templates/:identity', {
49
+ 'identity' => identity,
50
+ })
49
51
 
50
52
  options[:retry_failures] = true
51
53
 
@@ -98,7 +100,9 @@ module GoCardlessPro
98
100
  # @param identity # Unique identifier, beginning with "BRQ".
99
101
  # @param options [Hash] parameters as a hash, under a params key.
100
102
  def update(identity, options = {})
101
- path = sub_url('/billing_request_templates/:identity', 'identity' => identity)
103
+ path = sub_url('/billing_request_templates/:identity', {
104
+ 'identity' => identity,
105
+ })
102
106
 
103
107
  params = options.delete(:params) || {}
104
108
  options[:params] = {}
@@ -80,7 +80,9 @@ module GoCardlessPro
80
80
  # @param identity # Unique identifier, beginning with "BRQ".
81
81
  # @param options [Hash] parameters as a hash, under a params key.
82
82
  def get(identity, options = {})
83
- path = sub_url('/billing_requests/:identity', 'identity' => identity)
83
+ path = sub_url('/billing_requests/:identity', {
84
+ 'identity' => identity,
85
+ })
84
86
 
85
87
  options[:retry_failures] = true
86
88
 
@@ -106,7 +108,9 @@ module GoCardlessPro
106
108
  # @param identity # Unique identifier, beginning with "BRQ".
107
109
  # @param options [Hash] parameters as a hash, under a params key.
108
110
  def collect_customer_details(identity, options = {})
109
- path = sub_url('/billing_requests/:identity/actions/collect_customer_details', 'identity' => identity)
111
+ path = sub_url('/billing_requests/:identity/actions/collect_customer_details', {
112
+ 'identity' => identity,
113
+ })
110
114
 
111
115
  params = options.delete(:params) || {}
112
116
  options[:params] = {}
@@ -155,7 +159,9 @@ module GoCardlessPro
155
159
  # @param identity # Unique identifier, beginning with "BRQ".
156
160
  # @param options [Hash] parameters as a hash, under a params key.
157
161
  def collect_bank_account(identity, options = {})
158
- path = sub_url('/billing_requests/:identity/actions/collect_bank_account', 'identity' => identity)
162
+ path = sub_url('/billing_requests/:identity/actions/collect_bank_account', {
163
+ 'identity' => identity,
164
+ })
159
165
 
160
166
  params = options.delete(:params) || {}
161
167
  options[:params] = {}
@@ -193,7 +199,9 @@ module GoCardlessPro
193
199
  # @param identity # Unique identifier, beginning with "BRQ".
194
200
  # @param options [Hash] parameters as a hash, under a params key.
195
201
  def fulfil(identity, options = {})
196
- path = sub_url('/billing_requests/:identity/actions/fulfil', 'identity' => identity)
202
+ path = sub_url('/billing_requests/:identity/actions/fulfil', {
203
+ 'identity' => identity,
204
+ })
197
205
 
198
206
  params = options.delete(:params) || {}
199
207
  options[:params] = {}
@@ -236,7 +244,9 @@ module GoCardlessPro
236
244
  # @param identity # Unique identifier, beginning with "BRQ".
237
245
  # @param options [Hash] parameters as a hash, under a params key.
238
246
  def choose_currency(identity, options = {})
239
- path = sub_url('/billing_requests/:identity/actions/choose_currency', 'identity' => identity)
247
+ path = sub_url('/billing_requests/:identity/actions/choose_currency', {
248
+ 'identity' => identity,
249
+ })
240
250
 
241
251
  params = options.delete(:params) || {}
242
252
  options[:params] = {}
@@ -275,7 +285,9 @@ module GoCardlessPro
275
285
  # @param identity # Unique identifier, beginning with "BRQ".
276
286
  # @param options [Hash] parameters as a hash, under a params key.
277
287
  def confirm_payer_details(identity, options = {})
278
- path = sub_url('/billing_requests/:identity/actions/confirm_payer_details', 'identity' => identity)
288
+ path = sub_url('/billing_requests/:identity/actions/confirm_payer_details', {
289
+ 'identity' => identity,
290
+ })
279
291
 
280
292
  params = options.delete(:params) || {}
281
293
  options[:params] = {}
@@ -313,7 +325,9 @@ module GoCardlessPro
313
325
  # @param identity # Unique identifier, beginning with "BRQ".
314
326
  # @param options [Hash] parameters as a hash, under a params key.
315
327
  def cancel(identity, options = {})
316
- path = sub_url('/billing_requests/:identity/actions/cancel', 'identity' => identity)
328
+ path = sub_url('/billing_requests/:identity/actions/cancel', {
329
+ 'identity' => identity,
330
+ })
317
331
 
318
332
  params = options.delete(:params) || {}
319
333
  options[:params] = {}
@@ -352,7 +366,9 @@ module GoCardlessPro
352
366
  # @param identity # Unique identifier, beginning with "BRQ".
353
367
  # @param options [Hash] parameters as a hash, under a params key.
354
368
  def notify(identity, options = {})
355
- path = sub_url('/billing_requests/:identity/actions/notify', 'identity' => identity)
369
+ path = sub_url('/billing_requests/:identity/actions/notify', {
370
+ 'identity' => identity,
371
+ })
356
372
 
357
373
  params = options.delete(:params) || {}
358
374
  options[:params] = {}
@@ -390,7 +406,9 @@ module GoCardlessPro
390
406
  # @param identity # Unique identifier, beginning with "BRQ".
391
407
  # @param options [Hash] parameters as a hash, under a params key.
392
408
  def fallback(identity, options = {})
393
- path = sub_url('/billing_requests/:identity/actions/fallback', 'identity' => identity)
409
+ path = sub_url('/billing_requests/:identity/actions/fallback', {
410
+ 'identity' => identity,
411
+ })
394
412
 
395
413
  params = options.delete(:params) || {}
396
414
  options[:params] = {}
@@ -51,7 +51,9 @@ module GoCardlessPro
51
51
  # @param identity # Unique identifier, beginning with "BLC".
52
52
  # @param options [Hash] parameters as a hash, under a params key.
53
53
  def get(identity, options = {})
54
- path = sub_url('/blocks/:identity', 'identity' => identity)
54
+ path = sub_url('/blocks/:identity', {
55
+ 'identity' => identity,
56
+ })
55
57
 
56
58
  options[:retry_failures] = true
57
59
 
@@ -97,7 +99,9 @@ module GoCardlessPro
97
99
  # @param identity # Unique identifier, beginning with "BLC".
98
100
  # @param options [Hash] parameters as a hash, under a params key.
99
101
  def disable(identity, options = {})
100
- path = sub_url('/blocks/:identity/actions/disable', 'identity' => identity)
102
+ path = sub_url('/blocks/:identity/actions/disable', {
103
+ 'identity' => identity,
104
+ })
101
105
 
102
106
  params = options.delete(:params) || {}
103
107
  options[:params] = {}
@@ -134,7 +138,9 @@ module GoCardlessPro
134
138
  # @param identity # Unique identifier, beginning with "BLC".
135
139
  # @param options [Hash] parameters as a hash, under a params key.
136
140
  def enable(identity, options = {})
137
- path = sub_url('/blocks/:identity/actions/enable', 'identity' => identity)
141
+ path = sub_url('/blocks/:identity/actions/enable', {
142
+ 'identity' => identity,
143
+ })
138
144
 
139
145
  params = options.delete(:params) || {}
140
146
  options[:params] = {}
@@ -80,7 +80,9 @@ module GoCardlessPro
80
80
  # @param identity # Unique identifier, beginning with "BA".
81
81
  # @param options [Hash] parameters as a hash, under a params key.
82
82
  def get(identity, options = {})
83
- path = sub_url('/creditor_bank_accounts/:identity', 'identity' => identity)
83
+ path = sub_url('/creditor_bank_accounts/:identity', {
84
+ 'identity' => identity,
85
+ })
84
86
 
85
87
  options[:retry_failures] = true
86
88
 
@@ -104,7 +106,9 @@ module GoCardlessPro
104
106
  # @param identity # Unique identifier, beginning with "BA".
105
107
  # @param options [Hash] parameters as a hash, under a params key.
106
108
  def disable(identity, options = {})
107
- path = sub_url('/creditor_bank_accounts/:identity/actions/disable', 'identity' => identity)
109
+ path = sub_url('/creditor_bank_accounts/:identity/actions/disable', {
110
+ 'identity' => identity,
111
+ })
108
112
 
109
113
  params = options.delete(:params) || {}
110
114
  options[:params] = {}
@@ -80,7 +80,9 @@ module GoCardlessPro
80
80
  # @param identity # Unique identifier, beginning with "CR".
81
81
  # @param options [Hash] parameters as a hash, under a params key.
82
82
  def get(identity, options = {})
83
- path = sub_url('/creditors/:identity', 'identity' => identity)
83
+ path = sub_url('/creditors/:identity', {
84
+ 'identity' => identity,
85
+ })
84
86
 
85
87
  options[:retry_failures] = true
86
88
 
@@ -98,7 +100,9 @@ module GoCardlessPro
98
100
  # @param identity # Unique identifier, beginning with "CR".
99
101
  # @param options [Hash] parameters as a hash, under a params key.
100
102
  def update(identity, options = {})
101
- path = sub_url('/creditors/:identity', 'identity' => identity)
103
+ path = sub_url('/creditors/:identity', {
104
+ 'identity' => identity,
105
+ })
102
106
 
103
107
  params = options.delete(:params) || {}
104
108
  options[:params] = {}
@@ -126,7 +130,9 @@ module GoCardlessPro
126
130
  # @param identity # Unique identifier, beginning with "CR".
127
131
  # @param options [Hash] parameters as a hash, under a params key.
128
132
  def apply_scheme_identifier(identity, options = {})
129
- path = sub_url('/creditors/:identity/actions/apply_scheme_identifier', 'identity' => identity)
133
+ path = sub_url('/creditors/:identity/actions/apply_scheme_identifier', {
134
+ 'identity' => identity,
135
+ })
130
136
 
131
137
  params = options.delete(:params) || {}
132
138
  options[:params] = {}
@@ -92,7 +92,9 @@ module GoCardlessPro
92
92
  # @param identity # Unique identifier, beginning with "BA".
93
93
  # @param options [Hash] parameters as a hash, under a params key.
94
94
  def get(identity, options = {})
95
- path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
95
+ path = sub_url('/customer_bank_accounts/:identity', {
96
+ 'identity' => identity,
97
+ })
96
98
 
97
99
  options[:retry_failures] = true
98
100
 
@@ -110,7 +112,9 @@ module GoCardlessPro
110
112
  # @param identity # Unique identifier, beginning with "BA".
111
113
  # @param options [Hash] parameters as a hash, under a params key.
112
114
  def update(identity, options = {})
113
- path = sub_url('/customer_bank_accounts/:identity', 'identity' => identity)
115
+ path = sub_url('/customer_bank_accounts/:identity', {
116
+ 'identity' => identity,
117
+ })
114
118
 
115
119
  params = options.delete(:params) || {}
116
120
  options[:params] = {}
@@ -137,7 +141,9 @@ module GoCardlessPro
137
141
  # @param identity # Unique identifier, beginning with "BA".
138
142
  # @param options [Hash] parameters as a hash, under a params key.
139
143
  def disable(identity, options = {})
140
- path = sub_url('/customer_bank_accounts/:identity/actions/disable', 'identity' => identity)
144
+ path = sub_url('/customer_bank_accounts/:identity/actions/disable', {
145
+ 'identity' => identity,
146
+ })
141
147
 
142
148
  params = options.delete(:params) || {}
143
149
  options[:params] = {}
@@ -23,7 +23,9 @@ module GoCardlessPro
23
23
  # @param identity # The id of the notification.
24
24
  # @param options [Hash] parameters as a hash, under a params key.
25
25
  def handle(identity, options = {})
26
- path = sub_url('/customer_notifications/:identity/actions/handle', 'identity' => identity)
26
+ path = sub_url('/customer_notifications/:identity/actions/handle', {
27
+ 'identity' => identity,
28
+ })
27
29
 
28
30
  params = options.delete(:params) || {}
29
31
  options[:params] = {}