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.
- 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
|
@@ -80,7 +80,9 @@ module GoCardlessPro
|
|
|
80
80
|
# @param identity # Unique identifier, beginning with "CU".
|
|
81
81
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
82
82
|
def get(identity, options = {})
|
|
83
|
-
path = sub_url('/customers/:identity',
|
|
83
|
+
path = sub_url('/customers/: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 "CU".
|
|
99
101
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
100
102
|
def update(identity, options = {})
|
|
101
|
-
path = sub_url('/customers/:identity',
|
|
103
|
+
path = sub_url('/customers/: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 "CU".
|
|
127
131
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
128
132
|
def remove(identity, options = {})
|
|
129
|
-
path = sub_url('/customers/:identity',
|
|
133
|
+
path = sub_url('/customers/:identity', {
|
|
134
|
+
'identity' => identity,
|
|
135
|
+
})
|
|
130
136
|
|
|
131
137
|
options[:retry_failures] = false
|
|
132
138
|
|
|
@@ -45,7 +45,9 @@ module GoCardlessPro
|
|
|
45
45
|
# @param identity # Unique identifier, beginning with "EV".
|
|
46
46
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
47
47
|
def get(identity, options = {})
|
|
48
|
-
path = sub_url('/events/:identity',
|
|
48
|
+
path = sub_url('/events/:identity', {
|
|
49
|
+
'identity' => identity,
|
|
50
|
+
})
|
|
49
51
|
|
|
50
52
|
options[:retry_failures] = true
|
|
51
53
|
|
|
@@ -146,7 +146,9 @@ module GoCardlessPro
|
|
|
146
146
|
# @param identity # Unique identifier, beginning with "IS".
|
|
147
147
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
148
148
|
def get(identity, options = {})
|
|
149
|
-
path = sub_url('/instalment_schedules/:identity',
|
|
149
|
+
path = sub_url('/instalment_schedules/:identity', {
|
|
150
|
+
'identity' => identity,
|
|
151
|
+
})
|
|
150
152
|
|
|
151
153
|
options[:retry_failures] = true
|
|
152
154
|
|
|
@@ -163,7 +165,9 @@ module GoCardlessPro
|
|
|
163
165
|
# @param identity # Unique identifier, beginning with "IS".
|
|
164
166
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
165
167
|
def update(identity, options = {})
|
|
166
|
-
path = sub_url('/instalment_schedules/:identity',
|
|
168
|
+
path = sub_url('/instalment_schedules/:identity', {
|
|
169
|
+
'identity' => identity,
|
|
170
|
+
})
|
|
167
171
|
|
|
168
172
|
params = options.delete(:params) || {}
|
|
169
173
|
options[:params] = {}
|
|
@@ -188,7 +192,9 @@ module GoCardlessPro
|
|
|
188
192
|
# @param identity # Unique identifier, beginning with "IS".
|
|
189
193
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
190
194
|
def cancel(identity, options = {})
|
|
191
|
-
path = sub_url('/instalment_schedules/:identity/actions/cancel',
|
|
195
|
+
path = sub_url('/instalment_schedules/:identity/actions/cancel', {
|
|
196
|
+
'identity' => identity,
|
|
197
|
+
})
|
|
192
198
|
|
|
193
199
|
params = options.delete(:params) || {}
|
|
194
200
|
options[:params] = {}
|
|
@@ -55,7 +55,9 @@ module GoCardlessPro
|
|
|
55
55
|
# @param identity # Unique identifier, beginning with "IM".
|
|
56
56
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
57
57
|
def get(identity, options = {})
|
|
58
|
-
path = sub_url('/mandate_imports/:identity',
|
|
58
|
+
path = sub_url('/mandate_imports/:identity', {
|
|
59
|
+
'identity' => identity,
|
|
60
|
+
})
|
|
59
61
|
|
|
60
62
|
options[:retry_failures] = true
|
|
61
63
|
|
|
@@ -82,7 +84,9 @@ module GoCardlessPro
|
|
|
82
84
|
# @param identity # Unique identifier, beginning with "IM".
|
|
83
85
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
84
86
|
def submit(identity, options = {})
|
|
85
|
-
path = sub_url('/mandate_imports/:identity/actions/submit',
|
|
87
|
+
path = sub_url('/mandate_imports/:identity/actions/submit', {
|
|
88
|
+
'identity' => identity,
|
|
89
|
+
})
|
|
86
90
|
|
|
87
91
|
params = options.delete(:params) || {}
|
|
88
92
|
options[:params] = {}
|
|
@@ -125,7 +129,9 @@ module GoCardlessPro
|
|
|
125
129
|
# @param identity # Unique identifier, beginning with "IM".
|
|
126
130
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
127
131
|
def cancel(identity, options = {})
|
|
128
|
-
path = sub_url('/mandate_imports/:identity/actions/cancel',
|
|
132
|
+
path = sub_url('/mandate_imports/:identity/actions/cancel', {
|
|
133
|
+
'identity' => identity,
|
|
134
|
+
})
|
|
129
135
|
|
|
130
136
|
params = options.delete(:params) || {}
|
|
131
137
|
options[:params] = {}
|
|
@@ -81,7 +81,9 @@ module GoCardlessPro
|
|
|
81
81
|
# apply to mandates created before 2016.
|
|
82
82
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
83
83
|
def get(identity, options = {})
|
|
84
|
-
path = sub_url('/mandates/:identity',
|
|
84
|
+
path = sub_url('/mandates/:identity', {
|
|
85
|
+
'identity' => identity,
|
|
86
|
+
})
|
|
85
87
|
|
|
86
88
|
options[:retry_failures] = true
|
|
87
89
|
|
|
@@ -99,7 +101,9 @@ module GoCardlessPro
|
|
|
99
101
|
# apply to mandates created before 2016.
|
|
100
102
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
101
103
|
def update(identity, options = {})
|
|
102
|
-
path = sub_url('/mandates/:identity',
|
|
104
|
+
path = sub_url('/mandates/:identity', {
|
|
105
|
+
'identity' => identity,
|
|
106
|
+
})
|
|
103
107
|
|
|
104
108
|
params = options.delete(:params) || {}
|
|
105
109
|
options[:params] = {}
|
|
@@ -126,7 +130,9 @@ module GoCardlessPro
|
|
|
126
130
|
# apply to mandates created before 2016.
|
|
127
131
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
128
132
|
def cancel(identity, options = {})
|
|
129
|
-
path = sub_url('/mandates/:identity/actions/cancel',
|
|
133
|
+
path = sub_url('/mandates/:identity/actions/cancel', {
|
|
134
|
+
'identity' => identity,
|
|
135
|
+
})
|
|
130
136
|
|
|
131
137
|
params = options.delete(:params) || {}
|
|
132
138
|
options[:params] = {}
|
|
@@ -174,7 +180,9 @@ module GoCardlessPro
|
|
|
174
180
|
# apply to mandates created before 2016.
|
|
175
181
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
176
182
|
def reinstate(identity, options = {})
|
|
177
|
-
path = sub_url('/mandates/:identity/actions/reinstate',
|
|
183
|
+
path = sub_url('/mandates/:identity/actions/reinstate', {
|
|
184
|
+
'identity' => identity,
|
|
185
|
+
})
|
|
178
186
|
|
|
179
187
|
params = options.delete(:params) || {}
|
|
180
188
|
options[:params] = {}
|
|
@@ -17,7 +17,9 @@ module GoCardlessPro
|
|
|
17
17
|
# @param identity # Unique identifier, beginning with "PA".
|
|
18
18
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
19
19
|
def get(identity, options = {})
|
|
20
|
-
path = sub_url('/payer_authorisations/:identity',
|
|
20
|
+
path = sub_url('/payer_authorisations/:identity', {
|
|
21
|
+
'identity' => identity,
|
|
22
|
+
})
|
|
21
23
|
|
|
22
24
|
options[:retry_failures] = true
|
|
23
25
|
|
|
@@ -82,7 +84,9 @@ module GoCardlessPro
|
|
|
82
84
|
# @param identity # Unique identifier, beginning with "PA".
|
|
83
85
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
84
86
|
def update(identity, options = {})
|
|
85
|
-
path = sub_url('/payer_authorisations/:identity',
|
|
87
|
+
path = sub_url('/payer_authorisations/:identity', {
|
|
88
|
+
'identity' => identity,
|
|
89
|
+
})
|
|
86
90
|
|
|
87
91
|
params = options.delete(:params) || {}
|
|
88
92
|
options[:params] = {}
|
|
@@ -106,7 +110,9 @@ module GoCardlessPro
|
|
|
106
110
|
# @param identity # Unique identifier, beginning with "PA".
|
|
107
111
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
108
112
|
def submit(identity, options = {})
|
|
109
|
-
path = sub_url('/payer_authorisations/:identity/actions/submit',
|
|
113
|
+
path = sub_url('/payer_authorisations/:identity/actions/submit', {
|
|
114
|
+
'identity' => identity,
|
|
115
|
+
})
|
|
110
116
|
|
|
111
117
|
params = options.delete(:params) || {}
|
|
112
118
|
options[:params] = {}
|
|
@@ -153,7 +159,9 @@ module GoCardlessPro
|
|
|
153
159
|
# @param identity # Unique identifier, beginning with "PA".
|
|
154
160
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
155
161
|
def confirm(identity, options = {})
|
|
156
|
-
path = sub_url('/payer_authorisations/:identity/actions/confirm',
|
|
162
|
+
path = sub_url('/payer_authorisations/:identity/actions/confirm', {
|
|
163
|
+
'identity' => identity,
|
|
164
|
+
})
|
|
157
165
|
|
|
158
166
|
params = options.delete(:params) || {}
|
|
159
167
|
options[:params] = {}
|
|
@@ -85,7 +85,9 @@ module GoCardlessPro
|
|
|
85
85
|
# @param identity # Unique identifier, beginning with "PM".
|
|
86
86
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
87
87
|
def get(identity, options = {})
|
|
88
|
-
path = sub_url('/payments/:identity',
|
|
88
|
+
path = sub_url('/payments/:identity', {
|
|
89
|
+
'identity' => identity,
|
|
90
|
+
})
|
|
89
91
|
|
|
90
92
|
options[:retry_failures] = true
|
|
91
93
|
|
|
@@ -102,7 +104,9 @@ module GoCardlessPro
|
|
|
102
104
|
# @param identity # Unique identifier, beginning with "PM".
|
|
103
105
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
104
106
|
def update(identity, options = {})
|
|
105
|
-
path = sub_url('/payments/:identity',
|
|
107
|
+
path = sub_url('/payments/:identity', {
|
|
108
|
+
'identity' => identity,
|
|
109
|
+
})
|
|
106
110
|
|
|
107
111
|
params = options.delete(:params) || {}
|
|
108
112
|
options[:params] = {}
|
|
@@ -128,7 +132,9 @@ module GoCardlessPro
|
|
|
128
132
|
# @param identity # Unique identifier, beginning with "PM".
|
|
129
133
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
130
134
|
def cancel(identity, options = {})
|
|
131
|
-
path = sub_url('/payments/:identity/actions/cancel',
|
|
135
|
+
path = sub_url('/payments/:identity/actions/cancel', {
|
|
136
|
+
'identity' => identity,
|
|
137
|
+
})
|
|
132
138
|
|
|
133
139
|
params = options.delete(:params) || {}
|
|
134
140
|
options[:params] = {}
|
|
@@ -174,7 +180,9 @@ module GoCardlessPro
|
|
|
174
180
|
# @param identity # Unique identifier, beginning with "PM".
|
|
175
181
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
176
182
|
def retry(identity, options = {})
|
|
177
|
-
path = sub_url('/payments/:identity/actions/retry',
|
|
183
|
+
path = sub_url('/payments/:identity/actions/retry', {
|
|
184
|
+
'identity' => identity,
|
|
185
|
+
})
|
|
178
186
|
|
|
179
187
|
params = options.delete(:params) || {}
|
|
180
188
|
options[:params] = {}
|
|
@@ -47,7 +47,9 @@ module GoCardlessPro
|
|
|
47
47
|
# @param identity # Unique identifier, beginning with "PO".
|
|
48
48
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
49
49
|
def get(identity, options = {})
|
|
50
|
-
path = sub_url('/payouts/:identity',
|
|
50
|
+
path = sub_url('/payouts/:identity', {
|
|
51
|
+
'identity' => identity,
|
|
52
|
+
})
|
|
51
53
|
|
|
52
54
|
options[:retry_failures] = true
|
|
53
55
|
|
|
@@ -64,7 +66,9 @@ module GoCardlessPro
|
|
|
64
66
|
# @param identity # Unique identifier, beginning with "PO".
|
|
65
67
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
66
68
|
def update(identity, options = {})
|
|
67
|
-
path = sub_url('/payouts/:identity',
|
|
69
|
+
path = sub_url('/payouts/:identity', {
|
|
70
|
+
'identity' => identity,
|
|
71
|
+
})
|
|
68
72
|
|
|
69
73
|
params = options.delete(:params) || {}
|
|
70
74
|
options[:params] = {}
|
|
@@ -52,7 +52,9 @@ module GoCardlessPro
|
|
|
52
52
|
# @param identity # Unique identifier, beginning with "RE".
|
|
53
53
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
54
54
|
def get(identity, options = {})
|
|
55
|
-
path = sub_url('/redirect_flows/:identity',
|
|
55
|
+
path = sub_url('/redirect_flows/:identity', {
|
|
56
|
+
'identity' => identity,
|
|
57
|
+
})
|
|
56
58
|
|
|
57
59
|
options[:retry_failures] = true
|
|
58
60
|
|
|
@@ -78,7 +80,9 @@ module GoCardlessPro
|
|
|
78
80
|
# @param identity # Unique identifier, beginning with "RE".
|
|
79
81
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
80
82
|
def complete(identity, options = {})
|
|
81
|
-
path = sub_url('/redirect_flows/:identity/actions/complete',
|
|
83
|
+
path = sub_url('/redirect_flows/:identity/actions/complete', {
|
|
84
|
+
'identity' => identity,
|
|
85
|
+
})
|
|
82
86
|
|
|
83
87
|
params = options.delete(:params) || {}
|
|
84
88
|
options[:params] = {}
|
|
@@ -96,7 +96,9 @@ module GoCardlessPro
|
|
|
96
96
|
# @param identity # Unique identifier, beginning with "RF".
|
|
97
97
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
98
98
|
def get(identity, options = {})
|
|
99
|
-
path = sub_url('/refunds/:identity',
|
|
99
|
+
path = sub_url('/refunds/:identity', {
|
|
100
|
+
'identity' => identity,
|
|
101
|
+
})
|
|
100
102
|
|
|
101
103
|
options[:retry_failures] = true
|
|
102
104
|
|
|
@@ -113,7 +115,9 @@ module GoCardlessPro
|
|
|
113
115
|
# @param identity # Unique identifier, beginning with "RF".
|
|
114
116
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
115
117
|
def update(identity, options = {})
|
|
116
|
-
path = sub_url('/refunds/:identity',
|
|
118
|
+
path = sub_url('/refunds/:identity', {
|
|
119
|
+
'identity' => identity,
|
|
120
|
+
})
|
|
117
121
|
|
|
118
122
|
params = options.delete(:params) || {}
|
|
119
123
|
options[:params] = {}
|
|
@@ -140,7 +140,9 @@ module GoCardlessPro
|
|
|
140
140
|
# </ul>
|
|
141
141
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
142
142
|
def run(identity, options = {})
|
|
143
|
-
path = sub_url('/scenario_simulators/:identity/actions/run',
|
|
143
|
+
path = sub_url('/scenario_simulators/:identity/actions/run', {
|
|
144
|
+
'identity' => identity,
|
|
145
|
+
})
|
|
144
146
|
|
|
145
147
|
params = options.delete(:params) || {}
|
|
146
148
|
options[:params] = {}
|
|
@@ -85,7 +85,9 @@ module GoCardlessPro
|
|
|
85
85
|
# @param identity # Unique identifier, usually beginning with "SU".
|
|
86
86
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
87
87
|
def get(identity, options = {})
|
|
88
|
-
path = sub_url('/scheme_identifiers/:identity',
|
|
88
|
+
path = sub_url('/scheme_identifiers/:identity', {
|
|
89
|
+
'identity' => identity,
|
|
90
|
+
})
|
|
89
91
|
|
|
90
92
|
options[:retry_failures] = true
|
|
91
93
|
|
|
@@ -81,7 +81,9 @@ module GoCardlessPro
|
|
|
81
81
|
# @param identity # Unique identifier, beginning with "SB".
|
|
82
82
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
83
83
|
def get(identity, options = {})
|
|
84
|
-
path = sub_url('/subscriptions/:identity',
|
|
84
|
+
path = sub_url('/subscriptions/:identity', {
|
|
85
|
+
'identity' => identity,
|
|
86
|
+
})
|
|
85
87
|
|
|
86
88
|
options[:retry_failures] = true
|
|
87
89
|
|
|
@@ -121,7 +123,9 @@ module GoCardlessPro
|
|
|
121
123
|
# @param identity # Unique identifier, beginning with "SB".
|
|
122
124
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
123
125
|
def update(identity, options = {})
|
|
124
|
-
path = sub_url('/subscriptions/:identity',
|
|
126
|
+
path = sub_url('/subscriptions/:identity', {
|
|
127
|
+
'identity' => identity,
|
|
128
|
+
})
|
|
125
129
|
|
|
126
130
|
params = options.delete(:params) || {}
|
|
127
131
|
options[:params] = {}
|
|
@@ -182,7 +186,9 @@ module GoCardlessPro
|
|
|
182
186
|
# @param identity # Unique identifier, beginning with "SB".
|
|
183
187
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
184
188
|
def pause(identity, options = {})
|
|
185
|
-
path = sub_url('/subscriptions/:identity/actions/pause',
|
|
189
|
+
path = sub_url('/subscriptions/:identity/actions/pause', {
|
|
190
|
+
'identity' => identity,
|
|
191
|
+
})
|
|
186
192
|
|
|
187
193
|
params = options.delete(:params) || {}
|
|
188
194
|
options[:params] = {}
|
|
@@ -235,7 +241,9 @@ module GoCardlessPro
|
|
|
235
241
|
# @param identity # Unique identifier, beginning with "SB".
|
|
236
242
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
237
243
|
def resume(identity, options = {})
|
|
238
|
-
path = sub_url('/subscriptions/:identity/actions/resume',
|
|
244
|
+
path = sub_url('/subscriptions/:identity/actions/resume', {
|
|
245
|
+
'identity' => identity,
|
|
246
|
+
})
|
|
239
247
|
|
|
240
248
|
params = options.delete(:params) || {}
|
|
241
249
|
options[:params] = {}
|
|
@@ -277,7 +285,9 @@ module GoCardlessPro
|
|
|
277
285
|
# @param identity # Unique identifier, beginning with "SB".
|
|
278
286
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
279
287
|
def cancel(identity, options = {})
|
|
280
|
-
path = sub_url('/subscriptions/:identity/actions/cancel',
|
|
288
|
+
path = sub_url('/subscriptions/:identity/actions/cancel', {
|
|
289
|
+
'identity' => identity,
|
|
290
|
+
})
|
|
281
291
|
|
|
282
292
|
params = options.delete(:params) || {}
|
|
283
293
|
options[:params] = {}
|
|
@@ -45,7 +45,9 @@ module GoCardlessPro
|
|
|
45
45
|
# @param identity # The unique identifier created by the jurisdiction, tax type and version
|
|
46
46
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
47
47
|
def get(identity, options = {})
|
|
48
|
-
path = sub_url('/tax_rates/:identity',
|
|
48
|
+
path = sub_url('/tax_rates/:identity', {
|
|
49
|
+
'identity' => identity,
|
|
50
|
+
})
|
|
49
51
|
|
|
50
52
|
options[:retry_failures] = true
|
|
51
53
|
|
|
@@ -45,7 +45,9 @@ module GoCardlessPro
|
|
|
45
45
|
# @param identity # Unique identifier, beginning with "WB".
|
|
46
46
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
47
47
|
def get(identity, options = {})
|
|
48
|
-
path = sub_url('/webhooks/:identity',
|
|
48
|
+
path = sub_url('/webhooks/:identity', {
|
|
49
|
+
'identity' => identity,
|
|
50
|
+
})
|
|
49
51
|
|
|
50
52
|
options[:retry_failures] = true
|
|
51
53
|
|
|
@@ -62,7 +64,9 @@ module GoCardlessPro
|
|
|
62
64
|
# @param identity # Unique identifier, beginning with "WB".
|
|
63
65
|
# @param options [Hash] parameters as a hash, under a params key.
|
|
64
66
|
def retry(identity, options = {})
|
|
65
|
-
path = sub_url('/webhooks/:identity/actions/retry',
|
|
67
|
+
path = sub_url('/webhooks/:identity/actions/retry', {
|
|
68
|
+
'identity' => identity,
|
|
69
|
+
})
|
|
66
70
|
|
|
67
71
|
params = options.delete(:params) || {}
|
|
68
72
|
options[:params] = {}
|
|
@@ -70,6 +70,7 @@ module GoCardlessPro
|
|
|
70
70
|
# Neukirchen.
|
|
71
71
|
def secure_compare(a, b)
|
|
72
72
|
return false unless a.bytesize == b.bytesize
|
|
73
|
+
|
|
73
74
|
l = a.unpack('C*')
|
|
74
75
|
|
|
75
76
|
r = 0
|
|
@@ -87,10 +88,10 @@ module GoCardlessPro
|
|
|
87
88
|
raise ArgumentError, 'signature_header must be provided and must be a string'
|
|
88
89
|
end
|
|
89
90
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
return if options[:webhook_endpoint_secret].is_a?(String)
|
|
92
|
+
|
|
93
|
+
raise ArgumentError, 'webhook_endpoint_secret must be provided and must be a ' \
|
|
94
|
+
'string'
|
|
94
95
|
end
|
|
95
96
|
end
|
|
96
97
|
end
|
data/lib/gocardless_pro.rb
CHANGED
|
@@ -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.
|
|
@@ -20,7 +18,7 @@ version_file = 'gocardless_pro/version'
|
|
|
20
18
|
if File.file? File.expand_path("#{version_file}.rb", File.dirname(__FILE__))
|
|
21
19
|
require_relative version_file
|
|
22
20
|
else
|
|
23
|
-
GoCardlessPro::VERSION = ''
|
|
21
|
+
GoCardlessPro::VERSION = ''
|
|
24
22
|
end
|
|
25
23
|
|
|
26
24
|
require_relative 'gocardless_pro/api_service'
|
|
@@ -134,4 +132,4 @@ require_relative 'gocardless_pro/services/verification_details_service'
|
|
|
134
132
|
require_relative 'gocardless_pro/resources/webhook'
|
|
135
133
|
require_relative 'gocardless_pro/services/webhooks_service'
|
|
136
134
|
|
|
137
|
-
require_relative 'gocardless_pro/client
|
|
135
|
+
require_relative 'gocardless_pro/client'
|