gocardless_pro 2.56.0 → 3.0.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.
- checksums.yaml +4 -4
- data/lib/gocardless_pro/client.rb +8 -3
- data/lib/gocardless_pro/error.rb +3 -3
- data/lib/gocardless_pro/middlewares/raise_gocardless_errors.rb +3 -3
- data/lib/gocardless_pro/resources/bank_authorisation.rb +2 -9
- data/lib/gocardless_pro/resources/bank_details_lookup.rb +1 -3
- data/lib/gocardless_pro/resources/billing_request.rb +7 -10
- data/lib/gocardless_pro/resources/billing_request_flow.rb +2 -17
- data/lib/gocardless_pro/resources/billing_request_template.rb +2 -17
- data/lib/gocardless_pro/resources/block.rb +2 -8
- data/lib/gocardless_pro/resources/creditor.rb +2 -20
- data/lib/gocardless_pro/resources/creditor_bank_account.rb +2 -11
- data/lib/gocardless_pro/resources/currency_exchange_rate.rb +1 -4
- data/lib/gocardless_pro/resources/customer.rb +2 -18
- data/lib/gocardless_pro/resources/customer_bank_account.rb +3 -10
- data/lib/gocardless_pro/resources/customer_notification.rb +1 -5
- data/lib/gocardless_pro/resources/event.rb +2 -8
- data/lib/gocardless_pro/resources/export.rb +40 -0
- data/lib/gocardless_pro/resources/instalment_schedule.rb +1 -8
- data/lib/gocardless_pro/resources/institution.rb +1 -6
- data/lib/gocardless_pro/resources/mandate.rb +3 -13
- data/lib/gocardless_pro/resources/mandate_import.rb +1 -4
- data/lib/gocardless_pro/resources/mandate_import_entry.rb +1 -2
- data/lib/gocardless_pro/resources/mandate_pdf.rb +1 -2
- data/lib/gocardless_pro/resources/negative_balance_limit.rb +1 -4
- data/lib/gocardless_pro/resources/payer_authorisation.rb +1 -7
- data/lib/gocardless_pro/resources/payment.rb +2 -13
- data/lib/gocardless_pro/resources/payout.rb +2 -12
- data/lib/gocardless_pro/resources/payout_item.rb +1 -3
- data/lib/gocardless_pro/resources/redirect_flow.rb +2 -10
- data/lib/gocardless_pro/resources/refund.rb +1 -8
- data/lib/gocardless_pro/resources/scheme_identifier.rb +2 -18
- data/lib/gocardless_pro/resources/subscription.rb +3 -19
- data/lib/gocardless_pro/resources/tax_rate.rb +1 -6
- data/lib/gocardless_pro/resources/transferred_mandate.rb +1 -3
- data/lib/gocardless_pro/resources/verification_detail.rb +2 -9
- data/lib/gocardless_pro/resources/webhook.rb +2 -13
- data/lib/gocardless_pro/services/bank_authorisations_service.rb +1 -1
- data/lib/gocardless_pro/services/billing_request_flows_service.rb +1 -1
- data/lib/gocardless_pro/services/billing_request_templates_service.rb +2 -2
- data/lib/gocardless_pro/services/billing_requests_service.rb +10 -10
- data/lib/gocardless_pro/services/blocks_service.rb +3 -3
- data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +2 -2
- data/lib/gocardless_pro/services/creditors_service.rb +2 -2
- data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +3 -3
- data/lib/gocardless_pro/services/customer_notifications_service.rb +1 -1
- data/lib/gocardless_pro/services/customers_service.rb +3 -3
- data/lib/gocardless_pro/services/events_service.rb +1 -1
- data/lib/gocardless_pro/services/exports_service.rb +75 -0
- data/lib/gocardless_pro/services/instalment_schedules_service.rb +3 -3
- data/lib/gocardless_pro/services/institutions_service.rb +1 -1
- data/lib/gocardless_pro/services/logos_service.rb +5 -0
- data/lib/gocardless_pro/services/mandate_imports_service.rb +3 -3
- data/lib/gocardless_pro/services/mandates_service.rb +4 -4
- data/lib/gocardless_pro/services/payer_authorisations_service.rb +4 -4
- data/lib/gocardless_pro/services/payments_service.rb +4 -4
- data/lib/gocardless_pro/services/payouts_service.rb +2 -2
- data/lib/gocardless_pro/services/redirect_flows_service.rb +2 -2
- data/lib/gocardless_pro/services/refunds_service.rb +2 -2
- data/lib/gocardless_pro/services/scenario_simulators_service.rb +1 -1
- data/lib/gocardless_pro/services/scheme_identifiers_service.rb +1 -1
- data/lib/gocardless_pro/services/subscriptions_service.rb +5 -5
- data/lib/gocardless_pro/services/tax_rates_service.rb +1 -1
- data/lib/gocardless_pro/services/transferred_mandates_service.rb +1 -1
- data/lib/gocardless_pro/services/webhooks_service.rb +2 -2
- data/lib/gocardless_pro/version.rb +1 -1
- data/lib/gocardless_pro.rb +3 -0
- metadata +4 -2
@@ -15,24 +15,8 @@ module GoCardlessPro
|
|
15
15
|
# on customers' bank statements.
|
16
16
|
#
|
17
17
|
class SchemeIdentifier
|
18
|
-
attr_reader :address_line1
|
19
|
-
|
20
|
-
attr_reader :address_line3
|
21
|
-
attr_reader :can_specify_mandate_reference
|
22
|
-
attr_reader :city
|
23
|
-
attr_reader :country_code
|
24
|
-
attr_reader :created_at
|
25
|
-
attr_reader :currency
|
26
|
-
attr_reader :email
|
27
|
-
attr_reader :id
|
28
|
-
attr_reader :minimum_advance_notice
|
29
|
-
attr_reader :name
|
30
|
-
attr_reader :phone_number
|
31
|
-
attr_reader :postal_code
|
32
|
-
attr_reader :reference
|
33
|
-
attr_reader :region
|
34
|
-
attr_reader :scheme
|
35
|
-
attr_reader :status
|
18
|
+
attr_reader :address_line1, :address_line2, :address_line3, :can_specify_mandate_reference, :city, :country_code,
|
19
|
+
:created_at, :currency, :email, :id, :minimum_advance_notice, :name, :phone_number, :postal_code, :reference, :region, :scheme, :status
|
36
20
|
|
37
21
|
# Initialize a scheme_identifier resource instance
|
38
22
|
# @param object [Hash] an object returned from the API
|
@@ -68,25 +68,8 @@ module GoCardlessPro
|
|
68
68
|
# - otherwise the charge date will be rolled __forwards__ to the next
|
69
69
|
# business day.
|
70
70
|
class Subscription
|
71
|
-
attr_reader :amount
|
72
|
-
|
73
|
-
attr_reader :count
|
74
|
-
attr_reader :created_at
|
75
|
-
attr_reader :currency
|
76
|
-
attr_reader :day_of_month
|
77
|
-
attr_reader :earliest_charge_date_after_resume
|
78
|
-
attr_reader :end_date
|
79
|
-
attr_reader :id
|
80
|
-
attr_reader :interval
|
81
|
-
attr_reader :interval_unit
|
82
|
-
attr_reader :metadata
|
83
|
-
attr_reader :month
|
84
|
-
attr_reader :name
|
85
|
-
attr_reader :payment_reference
|
86
|
-
attr_reader :retry_if_possible
|
87
|
-
attr_reader :start_date
|
88
|
-
attr_reader :status
|
89
|
-
attr_reader :upcoming_payments
|
71
|
+
attr_reader :amount, :app_fee, :count, :created_at, :currency, :day_of_month, :earliest_charge_date_after_resume,
|
72
|
+
:end_date, :id, :interval, :interval_unit, :metadata, :month, :name, :parent_plan_paused, :payment_reference, :retry_if_possible, :start_date, :status, :upcoming_payments
|
90
73
|
|
91
74
|
# Initialize a subscription resource instance
|
92
75
|
# @param object [Hash] an object returned from the API
|
@@ -108,6 +91,7 @@ module GoCardlessPro
|
|
108
91
|
@metadata = object['metadata']
|
109
92
|
@month = object['month']
|
110
93
|
@name = object['name']
|
94
|
+
@parent_plan_paused = object['parent_plan_paused']
|
111
95
|
@payment_reference = object['payment_reference']
|
112
96
|
@retry_if_possible = object['retry_if_possible']
|
113
97
|
@start_date = object['start_date']
|
@@ -15,12 +15,7 @@ module GoCardlessPro
|
|
15
15
|
# We also maintain a [static list of the tax rates for each
|
16
16
|
# jurisdiction](#appendix-tax-rates).
|
17
17
|
class TaxRate
|
18
|
-
attr_reader :end_date
|
19
|
-
attr_reader :id
|
20
|
-
attr_reader :jurisdiction
|
21
|
-
attr_reader :percentage
|
22
|
-
attr_reader :start_date
|
23
|
-
attr_reader :type
|
18
|
+
attr_reader :end_date, :id, :jurisdiction, :percentage, :start_date, :type
|
24
19
|
|
25
20
|
# Initialize a tax_rate resource instance
|
26
21
|
# @param object [Hash] an object returned from the API
|
@@ -12,9 +12,7 @@ module GoCardlessPro
|
|
12
12
|
|
13
13
|
# Mandates that have been transferred using Current Account Switch Service
|
14
14
|
class TransferredMandate
|
15
|
-
attr_reader :encrypted_customer_bank_details
|
16
|
-
attr_reader :encrypted_decryption_key
|
17
|
-
attr_reader :public_key_id
|
15
|
+
attr_reader :encrypted_customer_bank_details, :encrypted_decryption_key, :public_key_id
|
18
16
|
|
19
17
|
# Initialize a transferred_mandate resource instance
|
20
18
|
# @param object [Hash] an object returned from the API
|
@@ -22,15 +22,8 @@ module GoCardlessPro
|
|
22
22
|
# your
|
23
23
|
# account.</p>
|
24
24
|
class VerificationDetail
|
25
|
-
attr_reader :address_line1
|
26
|
-
|
27
|
-
attr_reader :address_line3
|
28
|
-
attr_reader :city
|
29
|
-
attr_reader :company_number
|
30
|
-
attr_reader :description
|
31
|
-
attr_reader :directors
|
32
|
-
attr_reader :name
|
33
|
-
attr_reader :postal_code
|
25
|
+
attr_reader :address_line1, :address_line2, :address_line3, :city, :company_number, :description, :directors,
|
26
|
+
:name, :postal_code
|
34
27
|
|
35
28
|
# Initialize a verification_detail resource instance
|
36
29
|
# @param object [Hash] an object returned from the API
|
@@ -12,19 +12,8 @@ module GoCardlessPro
|
|
12
12
|
|
13
13
|
# Basic description of a webhook
|
14
14
|
class Webhook
|
15
|
-
attr_reader :created_at
|
16
|
-
|
17
|
-
attr_reader :is_test
|
18
|
-
attr_reader :request_body
|
19
|
-
attr_reader :request_headers
|
20
|
-
attr_reader :response_body
|
21
|
-
attr_reader :response_body_truncated
|
22
|
-
attr_reader :response_code
|
23
|
-
attr_reader :response_headers
|
24
|
-
attr_reader :response_headers_content_truncated
|
25
|
-
attr_reader :response_headers_count_truncated
|
26
|
-
attr_reader :successful
|
27
|
-
attr_reader :url
|
15
|
+
attr_reader :created_at, :id, :is_test, :request_body, :request_headers, :response_body,
|
16
|
+
:response_body_truncated, :response_code, :response_headers, :response_headers_content_truncated, :response_headers_count_truncated, :successful, :url
|
28
17
|
|
29
18
|
# Initialize a webhook resource instance
|
30
19
|
# @param object [Hash] an object returned from the API
|
@@ -52,7 +52,7 @@ module GoCardlessPro
|
|
52
52
|
# @param options [Hash] parameters as a hash, under a params key.
|
53
53
|
def get(identity, options = {})
|
54
54
|
path = sub_url('/bank_authorisations/:identity', {
|
55
|
-
'identity' => identity
|
55
|
+
'identity' => identity
|
56
56
|
})
|
57
57
|
|
58
58
|
options[:retry_failures] = true
|
@@ -38,7 +38,7 @@ module GoCardlessPro
|
|
38
38
|
# @param options [Hash] parameters as a hash, under a params key.
|
39
39
|
def initialise(identity, options = {})
|
40
40
|
path = sub_url('/billing_request_flows/:identity/actions/initialise', {
|
41
|
-
'identity' => identity
|
41
|
+
'identity' => identity
|
42
42
|
})
|
43
43
|
|
44
44
|
params = options.delete(:params) || {}
|
@@ -46,7 +46,7 @@ module GoCardlessPro
|
|
46
46
|
# @param options [Hash] parameters as a hash, under a params key.
|
47
47
|
def get(identity, options = {})
|
48
48
|
path = sub_url('/billing_request_templates/:identity', {
|
49
|
-
'identity' => identity
|
49
|
+
'identity' => identity
|
50
50
|
})
|
51
51
|
|
52
52
|
options[:retry_failures] = true
|
@@ -101,7 +101,7 @@ module GoCardlessPro
|
|
101
101
|
# @param options [Hash] parameters as a hash, under a params key.
|
102
102
|
def update(identity, options = {})
|
103
103
|
path = sub_url('/billing_request_templates/:identity', {
|
104
|
-
'identity' => identity
|
104
|
+
'identity' => identity
|
105
105
|
})
|
106
106
|
|
107
107
|
params = options.delete(:params) || {}
|
@@ -61,7 +61,7 @@ module GoCardlessPro
|
|
61
61
|
# @param options [Hash] parameters as a hash, under a params key.
|
62
62
|
def collect_customer_details(identity, options = {})
|
63
63
|
path = sub_url('/billing_requests/:identity/actions/collect_customer_details', {
|
64
|
-
'identity' => identity
|
64
|
+
'identity' => identity
|
65
65
|
})
|
66
66
|
|
67
67
|
params = options.delete(:params) || {}
|
@@ -122,7 +122,7 @@ module GoCardlessPro
|
|
122
122
|
# @param options [Hash] parameters as a hash, under a params key.
|
123
123
|
def collect_bank_account(identity, options = {})
|
124
124
|
path = sub_url('/billing_requests/:identity/actions/collect_bank_account', {
|
125
|
-
'identity' => identity
|
125
|
+
'identity' => identity
|
126
126
|
})
|
127
127
|
|
128
128
|
params = options.delete(:params) || {}
|
@@ -163,7 +163,7 @@ module GoCardlessPro
|
|
163
163
|
# @param options [Hash] parameters as a hash, under a params key.
|
164
164
|
def confirm_payer_details(identity, options = {})
|
165
165
|
path = sub_url('/billing_requests/:identity/actions/confirm_payer_details', {
|
166
|
-
'identity' => identity
|
166
|
+
'identity' => identity
|
167
167
|
})
|
168
168
|
|
169
169
|
params = options.delete(:params) || {}
|
@@ -203,7 +203,7 @@ module GoCardlessPro
|
|
203
203
|
# @param options [Hash] parameters as a hash, under a params key.
|
204
204
|
def fulfil(identity, options = {})
|
205
205
|
path = sub_url('/billing_requests/:identity/actions/fulfil', {
|
206
|
-
'identity' => identity
|
206
|
+
'identity' => identity
|
207
207
|
})
|
208
208
|
|
209
209
|
params = options.delete(:params) || {}
|
@@ -243,7 +243,7 @@ module GoCardlessPro
|
|
243
243
|
# @param options [Hash] parameters as a hash, under a params key.
|
244
244
|
def cancel(identity, options = {})
|
245
245
|
path = sub_url('/billing_requests/:identity/actions/cancel', {
|
246
|
-
'identity' => identity
|
246
|
+
'identity' => identity
|
247
247
|
})
|
248
248
|
|
249
249
|
params = options.delete(:params) || {}
|
@@ -311,7 +311,7 @@ module GoCardlessPro
|
|
311
311
|
# @param options [Hash] parameters as a hash, under a params key.
|
312
312
|
def get(identity, options = {})
|
313
313
|
path = sub_url('/billing_requests/:identity', {
|
314
|
-
'identity' => identity
|
314
|
+
'identity' => identity
|
315
315
|
})
|
316
316
|
|
317
317
|
options[:retry_failures] = true
|
@@ -335,7 +335,7 @@ module GoCardlessPro
|
|
335
335
|
# @param options [Hash] parameters as a hash, under a params key.
|
336
336
|
def notify(identity, options = {})
|
337
337
|
path = sub_url('/billing_requests/:identity/actions/notify', {
|
338
|
-
'identity' => identity
|
338
|
+
'identity' => identity
|
339
339
|
})
|
340
340
|
|
341
341
|
params = options.delete(:params) || {}
|
@@ -375,7 +375,7 @@ module GoCardlessPro
|
|
375
375
|
# @param options [Hash] parameters as a hash, under a params key.
|
376
376
|
def fallback(identity, options = {})
|
377
377
|
path = sub_url('/billing_requests/:identity/actions/fallback', {
|
378
|
-
'identity' => identity
|
378
|
+
'identity' => identity
|
379
379
|
})
|
380
380
|
|
381
381
|
params = options.delete(:params) || {}
|
@@ -420,7 +420,7 @@ module GoCardlessPro
|
|
420
420
|
# @param options [Hash] parameters as a hash, under a params key.
|
421
421
|
def choose_currency(identity, options = {})
|
422
422
|
path = sub_url('/billing_requests/:identity/actions/choose_currency', {
|
423
|
-
'identity' => identity
|
423
|
+
'identity' => identity
|
424
424
|
})
|
425
425
|
|
426
426
|
params = options.delete(:params) || {}
|
@@ -459,7 +459,7 @@ module GoCardlessPro
|
|
459
459
|
# @param options [Hash] parameters as a hash, under a params key.
|
460
460
|
def select_institution(identity, options = {})
|
461
461
|
path = sub_url('/billing_requests/:identity/actions/select_institution', {
|
462
|
-
'identity' => identity
|
462
|
+
'identity' => identity
|
463
463
|
})
|
464
464
|
|
465
465
|
params = options.delete(:params) || {}
|
@@ -52,7 +52,7 @@ module GoCardlessPro
|
|
52
52
|
# @param options [Hash] parameters as a hash, under a params key.
|
53
53
|
def get(identity, options = {})
|
54
54
|
path = sub_url('/blocks/:identity', {
|
55
|
-
'identity' => identity
|
55
|
+
'identity' => identity
|
56
56
|
})
|
57
57
|
|
58
58
|
options[:retry_failures] = true
|
@@ -100,7 +100,7 @@ module GoCardlessPro
|
|
100
100
|
# @param options [Hash] parameters as a hash, under a params key.
|
101
101
|
def disable(identity, options = {})
|
102
102
|
path = sub_url('/blocks/:identity/actions/disable', {
|
103
|
-
'identity' => identity
|
103
|
+
'identity' => identity
|
104
104
|
})
|
105
105
|
|
106
106
|
params = options.delete(:params) || {}
|
@@ -139,7 +139,7 @@ module GoCardlessPro
|
|
139
139
|
# @param options [Hash] parameters as a hash, under a params key.
|
140
140
|
def enable(identity, options = {})
|
141
141
|
path = sub_url('/blocks/:identity/actions/enable', {
|
142
|
-
'identity' => identity
|
142
|
+
'identity' => identity
|
143
143
|
})
|
144
144
|
|
145
145
|
params = options.delete(:params) || {}
|
@@ -81,7 +81,7 @@ module GoCardlessPro
|
|
81
81
|
# @param options [Hash] parameters as a hash, under a params key.
|
82
82
|
def get(identity, options = {})
|
83
83
|
path = sub_url('/creditor_bank_accounts/:identity', {
|
84
|
-
'identity' => identity
|
84
|
+
'identity' => identity
|
85
85
|
})
|
86
86
|
|
87
87
|
options[:retry_failures] = true
|
@@ -107,7 +107,7 @@ module GoCardlessPro
|
|
107
107
|
# @param options [Hash] parameters as a hash, under a params key.
|
108
108
|
def disable(identity, options = {})
|
109
109
|
path = sub_url('/creditor_bank_accounts/:identity/actions/disable', {
|
110
|
-
'identity' => identity
|
110
|
+
'identity' => identity
|
111
111
|
})
|
112
112
|
|
113
113
|
params = options.delete(:params) || {}
|
@@ -81,7 +81,7 @@ module GoCardlessPro
|
|
81
81
|
# @param options [Hash] parameters as a hash, under a params key.
|
82
82
|
def get(identity, options = {})
|
83
83
|
path = sub_url('/creditors/:identity', {
|
84
|
-
'identity' => identity
|
84
|
+
'identity' => identity
|
85
85
|
})
|
86
86
|
|
87
87
|
options[:retry_failures] = true
|
@@ -101,7 +101,7 @@ module GoCardlessPro
|
|
101
101
|
# @param options [Hash] parameters as a hash, under a params key.
|
102
102
|
def update(identity, options = {})
|
103
103
|
path = sub_url('/creditors/:identity', {
|
104
|
-
'identity' => identity
|
104
|
+
'identity' => identity
|
105
105
|
})
|
106
106
|
|
107
107
|
params = options.delete(:params) || {}
|
@@ -93,7 +93,7 @@ module GoCardlessPro
|
|
93
93
|
# @param options [Hash] parameters as a hash, under a params key.
|
94
94
|
def get(identity, options = {})
|
95
95
|
path = sub_url('/customer_bank_accounts/:identity', {
|
96
|
-
'identity' => identity
|
96
|
+
'identity' => identity
|
97
97
|
})
|
98
98
|
|
99
99
|
options[:retry_failures] = true
|
@@ -113,7 +113,7 @@ module GoCardlessPro
|
|
113
113
|
# @param options [Hash] parameters as a hash, under a params key.
|
114
114
|
def update(identity, options = {})
|
115
115
|
path = sub_url('/customer_bank_accounts/:identity', {
|
116
|
-
'identity' => identity
|
116
|
+
'identity' => identity
|
117
117
|
})
|
118
118
|
|
119
119
|
params = options.delete(:params) || {}
|
@@ -142,7 +142,7 @@ module GoCardlessPro
|
|
142
142
|
# @param options [Hash] parameters as a hash, under a params key.
|
143
143
|
def disable(identity, options = {})
|
144
144
|
path = sub_url('/customer_bank_accounts/:identity/actions/disable', {
|
145
|
-
'identity' => identity
|
145
|
+
'identity' => identity
|
146
146
|
})
|
147
147
|
|
148
148
|
params = options.delete(:params) || {}
|
@@ -24,7 +24,7 @@ module GoCardlessPro
|
|
24
24
|
# @param options [Hash] parameters as a hash, under a params key.
|
25
25
|
def handle(identity, options = {})
|
26
26
|
path = sub_url('/customer_notifications/:identity/actions/handle', {
|
27
|
-
'identity' => identity
|
27
|
+
'identity' => identity
|
28
28
|
})
|
29
29
|
|
30
30
|
params = options.delete(:params) || {}
|
@@ -81,7 +81,7 @@ module GoCardlessPro
|
|
81
81
|
# @param options [Hash] parameters as a hash, under a params key.
|
82
82
|
def get(identity, options = {})
|
83
83
|
path = sub_url('/customers/:identity', {
|
84
|
-
'identity' => identity
|
84
|
+
'identity' => identity
|
85
85
|
})
|
86
86
|
|
87
87
|
options[:retry_failures] = true
|
@@ -101,7 +101,7 @@ module GoCardlessPro
|
|
101
101
|
# @param options [Hash] parameters as a hash, under a params key.
|
102
102
|
def update(identity, options = {})
|
103
103
|
path = sub_url('/customers/:identity', {
|
104
|
-
'identity' => identity
|
104
|
+
'identity' => identity
|
105
105
|
})
|
106
106
|
|
107
107
|
params = options.delete(:params) || {}
|
@@ -131,7 +131,7 @@ module GoCardlessPro
|
|
131
131
|
# @param options [Hash] parameters as a hash, under a params key.
|
132
132
|
def remove(identity, options = {})
|
133
133
|
path = sub_url('/customers/:identity', {
|
134
|
-
'identity' => identity
|
134
|
+
'identity' => identity
|
135
135
|
})
|
136
136
|
|
137
137
|
options[:retry_failures] = false
|
@@ -46,7 +46,7 @@ module GoCardlessPro
|
|
46
46
|
# @param options [Hash] parameters as a hash, under a params key.
|
47
47
|
def get(identity, options = {})
|
48
48
|
path = sub_url('/events/:identity', {
|
49
|
-
'identity' => identity
|
49
|
+
'identity' => identity
|
50
50
|
})
|
51
51
|
|
52
52
|
options[:retry_failures] = true
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require_relative './base_service'
|
2
|
+
|
3
|
+
# encoding: utf-8
|
4
|
+
#
|
5
|
+
# This client is automatically generated from a template and JSON schema definition.
|
6
|
+
# See https://github.com/gocardless/gocardless-pro-ruby#contributing before editing.
|
7
|
+
#
|
8
|
+
|
9
|
+
module GoCardlessPro
|
10
|
+
module Services
|
11
|
+
# Service for making requests to the Export endpoints
|
12
|
+
class ExportsService < BaseService
|
13
|
+
# Returns a single export.
|
14
|
+
# Example URL: /exports/:identity
|
15
|
+
#
|
16
|
+
# @param identity # Unique identifier, beginning with "EX".
|
17
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
18
|
+
def get(identity, options = {})
|
19
|
+
path = sub_url('/exports/:identity', {
|
20
|
+
'identity' => identity
|
21
|
+
})
|
22
|
+
|
23
|
+
options[:retry_failures] = true
|
24
|
+
|
25
|
+
response = make_request(:get, path, options)
|
26
|
+
|
27
|
+
return if response.body.nil?
|
28
|
+
|
29
|
+
Resources::Export.new(unenvelope_body(response.body), response)
|
30
|
+
end
|
31
|
+
|
32
|
+
# Returns a list of exports which are available for download.
|
33
|
+
# Example URL: /exports
|
34
|
+
# @param options [Hash] parameters as a hash, under a params key.
|
35
|
+
def list(options = {})
|
36
|
+
path = '/exports'
|
37
|
+
|
38
|
+
options[:retry_failures] = true
|
39
|
+
|
40
|
+
response = make_request(:get, path, options)
|
41
|
+
|
42
|
+
ListResponse.new(
|
43
|
+
response: response,
|
44
|
+
unenveloped_body: unenvelope_body(response.body),
|
45
|
+
resource_class: Resources::Export
|
46
|
+
)
|
47
|
+
end
|
48
|
+
|
49
|
+
# Get a lazily enumerated list of all the items returned. This is similar to the `list` method but will paginate for you automatically.
|
50
|
+
#
|
51
|
+
# @param options [Hash] parameters as a hash. If the request is a GET, these will be converted to query parameters.
|
52
|
+
# Otherwise they will be the body of the request.
|
53
|
+
def all(options = {})
|
54
|
+
Paginator.new(
|
55
|
+
service: self,
|
56
|
+
options: options
|
57
|
+
).enumerator
|
58
|
+
end
|
59
|
+
|
60
|
+
private
|
61
|
+
|
62
|
+
# Unenvelope the response of the body using the service's `envelope_key`
|
63
|
+
#
|
64
|
+
# @param body [Hash]
|
65
|
+
def unenvelope_body(body)
|
66
|
+
body[envelope_key] || body['data']
|
67
|
+
end
|
68
|
+
|
69
|
+
# return the key which API responses will envelope data under
|
70
|
+
def envelope_key
|
71
|
+
'exports'
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -147,7 +147,7 @@ module GoCardlessPro
|
|
147
147
|
# @param options [Hash] parameters as a hash, under a params key.
|
148
148
|
def get(identity, options = {})
|
149
149
|
path = sub_url('/instalment_schedules/:identity', {
|
150
|
-
'identity' => identity
|
150
|
+
'identity' => identity
|
151
151
|
})
|
152
152
|
|
153
153
|
options[:retry_failures] = true
|
@@ -166,7 +166,7 @@ module GoCardlessPro
|
|
166
166
|
# @param options [Hash] parameters as a hash, under a params key.
|
167
167
|
def update(identity, options = {})
|
168
168
|
path = sub_url('/instalment_schedules/:identity', {
|
169
|
-
'identity' => identity
|
169
|
+
'identity' => identity
|
170
170
|
})
|
171
171
|
|
172
172
|
params = options.delete(:params) || {}
|
@@ -193,7 +193,7 @@ module GoCardlessPro
|
|
193
193
|
# @param options [Hash] parameters as a hash, under a params key.
|
194
194
|
def cancel(identity, options = {})
|
195
195
|
path = sub_url('/instalment_schedules/:identity/actions/cancel', {
|
196
|
-
'identity' => identity
|
196
|
+
'identity' => identity
|
197
197
|
})
|
198
198
|
|
199
199
|
params = options.delete(:params) || {}
|
@@ -47,7 +47,7 @@ module GoCardlessPro
|
|
47
47
|
# @param options [Hash] parameters as a hash, under a params key.
|
48
48
|
def list_for_billing_request(identity, options = {})
|
49
49
|
path = sub_url('/billing_requests/:identity/institutions', {
|
50
|
-
'identity' => identity
|
50
|
+
'identity' => identity
|
51
51
|
})
|
52
52
|
|
53
53
|
options[:retry_failures] = false
|
@@ -12,6 +12,11 @@ module GoCardlessPro
|
|
12
12
|
class LogosService < BaseService
|
13
13
|
# Creates a new logo associated with a creditor. If a creditor already has a
|
14
14
|
# logo, this will update the existing logo linked to the creditor.
|
15
|
+
#
|
16
|
+
# We support JPG and PNG formats. Your logo will be scaled to a maximum of 300px
|
17
|
+
# by 40px. For more guidance on how to upload logos that will look
|
18
|
+
# great across your customer payment page and notification emails see
|
19
|
+
# [here](https://developer.gocardless.com/gc-embed/setting-up-branding#tips_for_uploading_your_logo).
|
15
20
|
# Example URL: /branding/logos
|
16
21
|
# @param options [Hash] parameters as a hash, under a params key.
|
17
22
|
def create_for_creditor(options = {})
|
@@ -56,7 +56,7 @@ module GoCardlessPro
|
|
56
56
|
# @param options [Hash] parameters as a hash, under a params key.
|
57
57
|
def get(identity, options = {})
|
58
58
|
path = sub_url('/mandate_imports/:identity', {
|
59
|
-
'identity' => identity
|
59
|
+
'identity' => identity
|
60
60
|
})
|
61
61
|
|
62
62
|
options[:retry_failures] = true
|
@@ -85,7 +85,7 @@ module GoCardlessPro
|
|
85
85
|
# @param options [Hash] parameters as a hash, under a params key.
|
86
86
|
def submit(identity, options = {})
|
87
87
|
path = sub_url('/mandate_imports/:identity/actions/submit', {
|
88
|
-
'identity' => identity
|
88
|
+
'identity' => identity
|
89
89
|
})
|
90
90
|
|
91
91
|
params = options.delete(:params) || {}
|
@@ -130,7 +130,7 @@ module GoCardlessPro
|
|
130
130
|
# @param options [Hash] parameters as a hash, under a params key.
|
131
131
|
def cancel(identity, options = {})
|
132
132
|
path = sub_url('/mandate_imports/:identity/actions/cancel', {
|
133
|
-
'identity' => identity
|
133
|
+
'identity' => identity
|
134
134
|
})
|
135
135
|
|
136
136
|
params = options.delete(:params) || {}
|
@@ -82,7 +82,7 @@ module GoCardlessPro
|
|
82
82
|
# @param options [Hash] parameters as a hash, under a params key.
|
83
83
|
def get(identity, options = {})
|
84
84
|
path = sub_url('/mandates/:identity', {
|
85
|
-
'identity' => identity
|
85
|
+
'identity' => identity
|
86
86
|
})
|
87
87
|
|
88
88
|
options[:retry_failures] = true
|
@@ -102,7 +102,7 @@ module GoCardlessPro
|
|
102
102
|
# @param options [Hash] parameters as a hash, under a params key.
|
103
103
|
def update(identity, options = {})
|
104
104
|
path = sub_url('/mandates/:identity', {
|
105
|
-
'identity' => identity
|
105
|
+
'identity' => identity
|
106
106
|
})
|
107
107
|
|
108
108
|
params = options.delete(:params) || {}
|
@@ -131,7 +131,7 @@ module GoCardlessPro
|
|
131
131
|
# @param options [Hash] parameters as a hash, under a params key.
|
132
132
|
def cancel(identity, options = {})
|
133
133
|
path = sub_url('/mandates/:identity/actions/cancel', {
|
134
|
-
'identity' => identity
|
134
|
+
'identity' => identity
|
135
135
|
})
|
136
136
|
|
137
137
|
params = options.delete(:params) || {}
|
@@ -181,7 +181,7 @@ module GoCardlessPro
|
|
181
181
|
# @param options [Hash] parameters as a hash, under a params key.
|
182
182
|
def reinstate(identity, options = {})
|
183
183
|
path = sub_url('/mandates/:identity/actions/reinstate', {
|
184
|
-
'identity' => identity
|
184
|
+
'identity' => identity
|
185
185
|
})
|
186
186
|
|
187
187
|
params = options.delete(:params) || {}
|
@@ -18,7 +18,7 @@ module GoCardlessPro
|
|
18
18
|
# @param options [Hash] parameters as a hash, under a params key.
|
19
19
|
def get(identity, options = {})
|
20
20
|
path = sub_url('/payer_authorisations/:identity', {
|
21
|
-
'identity' => identity
|
21
|
+
'identity' => identity
|
22
22
|
})
|
23
23
|
|
24
24
|
options[:retry_failures] = true
|
@@ -85,7 +85,7 @@ module GoCardlessPro
|
|
85
85
|
# @param options [Hash] parameters as a hash, under a params key.
|
86
86
|
def update(identity, options = {})
|
87
87
|
path = sub_url('/payer_authorisations/:identity', {
|
88
|
-
'identity' => identity
|
88
|
+
'identity' => identity
|
89
89
|
})
|
90
90
|
|
91
91
|
params = options.delete(:params) || {}
|
@@ -111,7 +111,7 @@ module GoCardlessPro
|
|
111
111
|
# @param options [Hash] parameters as a hash, under a params key.
|
112
112
|
def submit(identity, options = {})
|
113
113
|
path = sub_url('/payer_authorisations/:identity/actions/submit', {
|
114
|
-
'identity' => identity
|
114
|
+
'identity' => identity
|
115
115
|
})
|
116
116
|
|
117
117
|
params = options.delete(:params) || {}
|
@@ -160,7 +160,7 @@ module GoCardlessPro
|
|
160
160
|
# @param options [Hash] parameters as a hash, under a params key.
|
161
161
|
def confirm(identity, options = {})
|
162
162
|
path = sub_url('/payer_authorisations/:identity/actions/confirm', {
|
163
|
-
'identity' => identity
|
163
|
+
'identity' => identity
|
164
164
|
})
|
165
165
|
|
166
166
|
params = options.delete(:params) || {}
|