gocardless_pro 2.41.0 → 2.41.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gocardless_pro/api_service.rb +4 -5
- data/lib/gocardless_pro/client.rb +3 -3
- data/lib/gocardless_pro/error/invalid_state_error.rb +1 -0
- data/lib/gocardless_pro/error.rb +1 -0
- data/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +7 -9
- data/lib/gocardless_pro/request.rb +5 -7
- data/lib/gocardless_pro/resources/bank_authorisation.rb +0 -2
- data/lib/gocardless_pro/resources/bank_details_lookup.rb +0 -2
- data/lib/gocardless_pro/resources/billing_request.rb +0 -2
- data/lib/gocardless_pro/resources/billing_request_flow.rb +0 -2
- data/lib/gocardless_pro/resources/billing_request_template.rb +0 -2
- data/lib/gocardless_pro/resources/block.rb +0 -2
- data/lib/gocardless_pro/resources/creditor.rb +0 -2
- data/lib/gocardless_pro/resources/creditor_bank_account.rb +0 -2
- data/lib/gocardless_pro/resources/currency_exchange_rate.rb +0 -2
- data/lib/gocardless_pro/resources/customer.rb +0 -2
- data/lib/gocardless_pro/resources/customer_bank_account.rb +0 -2
- data/lib/gocardless_pro/resources/customer_notification.rb +0 -2
- data/lib/gocardless_pro/resources/event.rb +0 -2
- data/lib/gocardless_pro/resources/instalment_schedule.rb +0 -2
- data/lib/gocardless_pro/resources/institution.rb +0 -2
- data/lib/gocardless_pro/resources/mandate.rb +0 -2
- data/lib/gocardless_pro/resources/mandate_import.rb +0 -2
- data/lib/gocardless_pro/resources/mandate_import_entry.rb +0 -2
- data/lib/gocardless_pro/resources/mandate_pdf.rb +0 -2
- data/lib/gocardless_pro/resources/payer_authorisation.rb +0 -2
- data/lib/gocardless_pro/resources/payment.rb +0 -2
- data/lib/gocardless_pro/resources/payout.rb +0 -2
- data/lib/gocardless_pro/resources/payout_item.rb +0 -2
- data/lib/gocardless_pro/resources/redirect_flow.rb +0 -2
- data/lib/gocardless_pro/resources/refund.rb +0 -2
- data/lib/gocardless_pro/resources/scenario_simulator.rb +0 -2
- data/lib/gocardless_pro/resources/scheme_identifier.rb +0 -2
- data/lib/gocardless_pro/resources/subscription.rb +0 -2
- data/lib/gocardless_pro/resources/tax_rate.rb +0 -2
- data/lib/gocardless_pro/resources/verification_detail.rb +0 -2
- data/lib/gocardless_pro/resources/webhook.rb +0 -2
- data/lib/gocardless_pro/services/bank_authorisations_service.rb +3 -1
- data/lib/gocardless_pro/services/billing_request_flows_service.rb +3 -1
- data/lib/gocardless_pro/services/billing_request_templates_service.rb +6 -2
- data/lib/gocardless_pro/services/billing_requests_service.rb +27 -9
- data/lib/gocardless_pro/services/blocks_service.rb +9 -3
- data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +6 -2
- data/lib/gocardless_pro/services/creditors_service.rb +9 -3
- data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +9 -3
- data/lib/gocardless_pro/services/customer_notifications_service.rb +3 -1
- data/lib/gocardless_pro/services/customers_service.rb +9 -3
- data/lib/gocardless_pro/services/events_service.rb +3 -1
- data/lib/gocardless_pro/services/instalment_schedules_service.rb +9 -3
- data/lib/gocardless_pro/services/mandate_imports_service.rb +9 -3
- data/lib/gocardless_pro/services/mandates_service.rb +12 -4
- data/lib/gocardless_pro/services/payer_authorisations_service.rb +12 -4
- data/lib/gocardless_pro/services/payments_service.rb +12 -4
- data/lib/gocardless_pro/services/payouts_service.rb +6 -2
- data/lib/gocardless_pro/services/redirect_flows_service.rb +6 -2
- data/lib/gocardless_pro/services/refunds_service.rb +6 -2
- data/lib/gocardless_pro/services/scenario_simulators_service.rb +3 -1
- data/lib/gocardless_pro/services/scheme_identifiers_service.rb +3 -1
- data/lib/gocardless_pro/services/subscriptions_service.rb +15 -5
- data/lib/gocardless_pro/services/tax_rates_service.rb +3 -1
- data/lib/gocardless_pro/services/webhooks_service.rb +6 -2
- data/lib/gocardless_pro/version.rb +1 -2
- data/lib/gocardless_pro/webhook.rb +5 -4
- data/lib/gocardless_pro.rb +2 -4
- metadata +5 -195
- data/.github/workflows/tests.yml +0 -40
- data/.gitignore +0 -1
- data/.rspec +0 -2
- data/.rubocop.yml +0 -5
- data/.travis.yml +0 -10
- data/LICENSE.txt +0 -22
- data/demo.rb +0 -9
- data/gocardless_pro.gemspec +0 -39
- data/spec/api_response_spec.rb +0 -28
- data/spec/api_service_spec.rb +0 -188
- data/spec/client_spec.rb +0 -19
- data/spec/error_spec.rb +0 -53
- data/spec/middlewares/raise_gocardless_errors_spec.rb +0 -127
- data/spec/resources/bank_authorisation_spec.rb +0 -259
- data/spec/resources/bank_details_lookup_spec.rb +0 -121
- data/spec/resources/billing_request_flow_spec.rb +0 -257
- data/spec/resources/billing_request_spec.rb +0 -962
- data/spec/resources/billing_request_template_spec.rb +0 -515
- data/spec/resources/block_spec.rb +0 -577
- data/spec/resources/creditor_bank_account_spec.rb +0 -472
- data/spec/resources/creditor_spec.rb +0 -659
- data/spec/resources/currency_exchange_rate_spec.rb +0 -103
- data/spec/resources/customer_bank_account_spec.rb +0 -509
- data/spec/resources/customer_notification_spec.rb +0 -75
- data/spec/resources/customer_spec.rb +0 -616
- data/spec/resources/event_spec.rb +0 -210
- data/spec/resources/instalment_schedule_spec.rb +0 -636
- data/spec/resources/institution_spec.rb +0 -113
- data/spec/resources/mandate_import_entry_spec.rb +0 -206
- data/spec/resources/mandate_import_spec.rb +0 -344
- data/spec/resources/mandate_pdf_spec.rb +0 -117
- data/spec/resources/mandate_spec.rb +0 -600
- data/spec/resources/payer_authorisation_spec.rb +0 -422
- data/spec/resources/payment_spec.rb +0 -617
- data/spec/resources/payout_item_spec.rb +0 -101
- data/spec/resources/payout_spec.rb +0 -284
- data/spec/resources/redirect_flow_spec.rb +0 -347
- data/spec/resources/refund_spec.rb +0 -409
- data/spec/resources/scenario_simulator_spec.rb +0 -65
- data/spec/resources/scheme_identifier_spec.rb +0 -484
- data/spec/resources/subscription_spec.rb +0 -828
- data/spec/resources/tax_rate_spec.rb +0 -198
- data/spec/resources/verification_detail_spec.rb +0 -145
- data/spec/resources/webhook_spec.rb +0 -325
- data/spec/response_spec.rb +0 -34
- data/spec/services/bank_authorisations_service_spec.rb +0 -353
- data/spec/services/bank_details_lookups_service_spec.rb +0 -144
- data/spec/services/billing_request_flows_service_spec.rb +0 -291
- data/spec/services/billing_request_templates_service_spec.rb +0 -806
- data/spec/services/billing_requests_service_spec.rb +0 -1288
- data/spec/services/blocks_service_spec.rb +0 -840
- data/spec/services/creditor_bank_accounts_service_spec.rb +0 -725
- data/spec/services/creditors_service_spec.rb +0 -977
- data/spec/services/currency_exchange_rates_service_spec.rb +0 -223
- data/spec/services/customer_bank_accounts_service_spec.rb +0 -787
- data/spec/services/customer_notifications_service_spec.rb +0 -86
- data/spec/services/customers_service_spec.rb +0 -922
- data/spec/services/events_service_spec.rb +0 -401
- data/spec/services/instalment_schedules_service_spec.rb +0 -945
- data/spec/services/institutions_service_spec.rb +0 -241
- data/spec/services/mandate_import_entries_service_spec.rb +0 -345
- data/spec/services/mandate_imports_service_spec.rb +0 -460
- data/spec/services/mandate_pdfs_service_spec.rb +0 -140
- data/spec/services/mandates_service_spec.rb +0 -893
- data/spec/services/payer_authorisations_service_spec.rb +0 -563
- data/spec/services/payments_service_spec.rb +0 -914
- data/spec/services/payout_items_service_spec.rb +0 -221
- data/spec/services/payouts_service_spec.rb +0 -520
- data/spec/services/redirect_flows_service_spec.rb +0 -452
- data/spec/services/refunds_service_spec.rb +0 -668
- data/spec/services/scenario_simulators_service_spec.rb +0 -76
- data/spec/services/scheme_identifiers_service_spec.rb +0 -754
- data/spec/services/subscriptions_service_spec.rb +0 -1164
- data/spec/services/tax_rates_service_spec.rb +0 -381
- data/spec/services/verification_details_service_spec.rb +0 -168
- data/spec/services/webhooks_service_spec.rb +0 -547
- data/spec/spec_helper.rb +0 -90
- data/spec/webhook_spec.rb +0 -122
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e9725480d2dc2fc482dae8257c5f426aed030db8f58f51d074e9ddcdbe862de
|
4
|
+
data.tar.gz: a5811ee88da9fc7ef0e05c22978d4a47b85c25ec99c85bacb03f61deaa1363e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
39
|
-
|
40
|
-
|
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
|
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.
|
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
|
232
|
+
"#{RUBY_PLATFORM}",
|
233
233
|
]
|
234
234
|
comment << "faraday/#{Faraday::VERSION}"
|
235
235
|
"#{gem_info} #{comment.join(' ')}"
|
data/lib/gocardless_pro/error.rb
CHANGED
@@ -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
|
-
|
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
|
-
|
12
|
+
json_body ||= JSON.parse(env.body) unless env.body.empty?
|
13
|
+
error_type = json_body['error']['type']
|
17
14
|
|
18
|
-
|
19
|
-
|
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 =>
|
55
|
+
rescue StandardError => e
|
56
56
|
requests_attempted += 1
|
57
57
|
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
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
|
|
@@ -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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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',
|
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] = {}
|