gocardless_pro 4.3.0 → 4.4.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/README.md +16 -0
- data/lib/gocardless_pro/client.rb +11 -1
- data/lib/gocardless_pro/list_response.rb +2 -2
- data/lib/gocardless_pro/resources/billing_request.rb +7 -8
- data/lib/gocardless_pro/resources/billing_request_with_action.rb +4 -4
- data/lib/gocardless_pro/resources/block.rb +4 -6
- data/lib/gocardless_pro/resources/creditor.rb +6 -4
- data/lib/gocardless_pro/resources/creditor_bank_account.rb +6 -5
- data/lib/gocardless_pro/resources/customer.rb +4 -3
- data/lib/gocardless_pro/resources/customer_bank_account.rb +13 -8
- data/lib/gocardless_pro/resources/customer_notification.rb +3 -4
- data/lib/gocardless_pro/resources/event.rb +13 -2
- data/lib/gocardless_pro/resources/export.rb +2 -0
- data/lib/gocardless_pro/resources/instalment_schedule.rb +0 -1
- data/lib/gocardless_pro/resources/institution.rb +3 -3
- data/lib/gocardless_pro/resources/logo.rb +2 -1
- data/lib/gocardless_pro/resources/mandate.rb +7 -4
- data/lib/gocardless_pro/resources/mandate_import.rb +25 -21
- data/lib/gocardless_pro/resources/mandate_import_entry.rb +13 -16
- data/lib/gocardless_pro/resources/mandate_pdf.rb +3 -3
- data/lib/gocardless_pro/resources/negative_balance_limit.rb +0 -1
- data/lib/gocardless_pro/resources/outbound_payment.rb +11 -4
- data/lib/gocardless_pro/resources/outbound_payment_import.rb +81 -0
- data/lib/gocardless_pro/resources/outbound_payment_import_entry.rb +77 -0
- data/lib/gocardless_pro/resources/payer_authorisation.rb +27 -31
- data/lib/gocardless_pro/resources/payment.rb +9 -6
- data/lib/gocardless_pro/resources/payment_account.rb +2 -1
- data/lib/gocardless_pro/resources/payment_account_transaction.rb +2 -1
- data/lib/gocardless_pro/resources/payout.rb +7 -6
- data/lib/gocardless_pro/resources/payout_item.rb +1 -2
- data/lib/gocardless_pro/resources/redirect_flow.rb +34 -23
- data/lib/gocardless_pro/resources/refund.rb +8 -6
- data/lib/gocardless_pro/resources/scheme_identifier.rb +0 -1
- data/lib/gocardless_pro/resources/subscription.rb +17 -14
- data/lib/gocardless_pro/resources/tax_rate.rb +2 -2
- data/lib/gocardless_pro/resources/verification_detail.rb +10 -6
- data/lib/gocardless_pro/services/balances_service.rb +11 -3
- data/lib/gocardless_pro/services/bank_account_details_service.rb +10 -4
- data/lib/gocardless_pro/services/bank_account_holder_verifications_service.rb +7 -1
- data/lib/gocardless_pro/services/bank_authorisations_service.rb +7 -1
- data/lib/gocardless_pro/services/bank_details_lookups_service.rb +14 -6
- data/lib/gocardless_pro/services/billing_request_flows_service.rb +7 -1
- data/lib/gocardless_pro/services/billing_request_templates_service.rb +10 -3
- data/lib/gocardless_pro/services/billing_request_with_actions_service.rb +7 -1
- data/lib/gocardless_pro/services/billing_requests_service.rb +18 -13
- data/lib/gocardless_pro/services/blocks_service.rb +10 -3
- data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +10 -3
- data/lib/gocardless_pro/services/creditors_service.rb +10 -3
- data/lib/gocardless_pro/services/currency_exchange_rates_service.rb +10 -3
- data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +20 -10
- data/lib/gocardless_pro/services/customer_notifications_service.rb +7 -2
- data/lib/gocardless_pro/services/customers_service.rb +11 -5
- data/lib/gocardless_pro/services/events_service.rb +15 -3
- data/lib/gocardless_pro/services/exports_service.rb +7 -1
- data/lib/gocardless_pro/services/funds_availabilities_service.rb +7 -1
- data/lib/gocardless_pro/services/instalment_schedules_service.rb +15 -7
- data/lib/gocardless_pro/services/institutions_service.rb +7 -1
- data/lib/gocardless_pro/services/logos_service.rb +9 -3
- data/lib/gocardless_pro/services/mandate_import_entries_service.rb +10 -4
- data/lib/gocardless_pro/services/mandate_imports_service.rb +10 -2
- data/lib/gocardless_pro/services/mandate_pdfs_service.rb +11 -5
- data/lib/gocardless_pro/services/mandates_service.rb +16 -9
- data/lib/gocardless_pro/services/negative_balance_limits_service.rb +10 -3
- data/lib/gocardless_pro/services/outbound_payment_import_entries_service.rb +64 -0
- data/lib/gocardless_pro/services/outbound_payment_imports_service.rb +118 -0
- data/lib/gocardless_pro/services/outbound_payments_service.rb +11 -4
- data/lib/gocardless_pro/services/payer_authorisations_service.rb +11 -8
- data/lib/gocardless_pro/services/payer_themes_service.rb +7 -1
- data/lib/gocardless_pro/services/payment_account_transactions_service.rb +34 -7
- data/lib/gocardless_pro/services/payment_accounts_service.rb +10 -3
- data/lib/gocardless_pro/services/payments_service.rb +22 -14
- data/lib/gocardless_pro/services/payout_items_service.rb +12 -7
- data/lib/gocardless_pro/services/payouts_service.rb +12 -5
- data/lib/gocardless_pro/services/redirect_flows_service.rb +15 -5
- data/lib/gocardless_pro/services/refunds_service.rb +15 -10
- data/lib/gocardless_pro/services/scenario_simulators_service.rb +85 -82
- data/lib/gocardless_pro/services/scheme_identifiers_service.rb +13 -7
- data/lib/gocardless_pro/services/subscriptions_service.rb +48 -38
- data/lib/gocardless_pro/services/tax_rates_service.rb +10 -3
- data/lib/gocardless_pro/services/transferred_mandates_service.rb +7 -1
- data/lib/gocardless_pro/services/verification_details_service.rb +7 -1
- data/lib/gocardless_pro/services/webhooks_service.rb +10 -3
- data/lib/gocardless_pro/version.rb +1 -1
- data/lib/gocardless_pro/webhook.rb +45 -0
- data/lib/gocardless_pro.rb +6 -0
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 391ae6d45356b902c0a936c5bb167740fd9415d1213c146fd0ba9bdd5416cc4c
|
|
4
|
+
data.tar.gz: cea405daca5960666de0eb79eaee3d963a1b3fba19df415cfef9f9e755ca719f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a0890972bcdb70acf2d1b6834093226cd46aad6ef811b9edf00dd2235c6c9527165c6d6b50b1883fc5af8fd28ad77d1d69036dc7d3e1764a1cc89df5e8bff04
|
|
7
|
+
data.tar.gz: 2c31f226752ba9ef70f61e1befb5cbc1c1d716c7f6d6f46b7c94ddb2d4b10f31e60e8b8611e956aadd163e2deadb24aef404796c29b8edbaee9d6080c4c35bf6
|
data/README.md
CHANGED
|
@@ -250,6 +250,22 @@ class WebhooksController < ApplicationController
|
|
|
250
250
|
end
|
|
251
251
|
```
|
|
252
252
|
|
|
253
|
+
#### Accessing the webhook ID
|
|
254
|
+
|
|
255
|
+
If you need to access the webhook ID for debugging purposes, you can use `parse_with_meta` instead:
|
|
256
|
+
|
|
257
|
+
```ruby
|
|
258
|
+
result = GoCardlessPro::Webhook.parse_with_meta(
|
|
259
|
+
request_body: request.raw_post,
|
|
260
|
+
signature_header: request.headers['Webhook-Signature'],
|
|
261
|
+
webhook_endpoint_secret: webhook_endpoint_secret
|
|
262
|
+
)
|
|
263
|
+
events = result.events
|
|
264
|
+
webhook_id = result.webhook_id # e.g. "WB123" - useful for debugging
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
Note: The webhook ID is intended for debugging and logging purposes only. It should not be used for deduplication - instead, use the event IDs to deduplicate, as each event has a unique ID that remains consistent if the same event is sent multiple times.
|
|
268
|
+
|
|
253
269
|
For more details on working with webhooks, see our ["Getting started" guide](https://developer.gocardless.com/getting-started/api/introduction/?lang=ruby).
|
|
254
270
|
|
|
255
271
|
### Using the OAuth API
|
|
@@ -143,6 +143,16 @@ module GoCardlessPro
|
|
|
143
143
|
@outbound_payments ||= Services::OutboundPaymentsService.new(@api_service)
|
|
144
144
|
end
|
|
145
145
|
|
|
146
|
+
# Access to the service for outbound_payment_import to make API calls
|
|
147
|
+
def outbound_payment_imports
|
|
148
|
+
@outbound_payment_imports ||= Services::OutboundPaymentImportsService.new(@api_service)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# Access to the service for outbound_payment_import_entry to make API calls
|
|
152
|
+
def outbound_payment_import_entries
|
|
153
|
+
@outbound_payment_import_entries ||= Services::OutboundPaymentImportEntriesService.new(@api_service)
|
|
154
|
+
end
|
|
155
|
+
|
|
146
156
|
# Access to the service for payer_authorisation to make API calls
|
|
147
157
|
def payer_authorisations
|
|
148
158
|
@payer_authorisations ||= Services::PayerAuthorisationsService.new(@api_service)
|
|
@@ -273,7 +283,7 @@ module GoCardlessPro
|
|
|
273
283
|
'User-Agent' => "#{user_agent}",
|
|
274
284
|
'Content-Type' => 'application/json',
|
|
275
285
|
'GoCardless-Client-Library' => 'gocardless-pro-ruby',
|
|
276
|
-
'GoCardless-Client-Version' => '4.
|
|
286
|
+
'GoCardless-Client-Version' => '4.4.1',
|
|
277
287
|
},
|
|
278
288
|
}
|
|
279
289
|
end
|
|
@@ -22,12 +22,12 @@ module GoCardlessPro
|
|
|
22
22
|
|
|
23
23
|
# return the before cursor for paginating
|
|
24
24
|
def before
|
|
25
|
-
@response.body
|
|
25
|
+
@response.body.dig('meta', 'cursors', 'before')
|
|
26
26
|
end
|
|
27
27
|
|
|
28
28
|
# return the after cursor for paginating
|
|
29
29
|
def after
|
|
30
|
-
@response.body
|
|
30
|
+
@response.body.dig('meta', 'cursors', 'after')
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
33
|
end
|
|
@@ -10,17 +10,16 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a billing_request resource returned from the API
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Billing Requests help create resources that require input or action from a
|
|
14
|
+
# customer. An example of required input might be additional customer
|
|
15
15
|
# billing details, while an action would be asking a customer to authorise a
|
|
16
16
|
# payment using their mobile banking app.
|
|
17
17
|
#
|
|
18
|
-
# See
|
|
19
|
-
#
|
|
20
|
-
# for how-to's, explanations and tutorials.
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
# supported for ACH and PAD schemes.</p>
|
|
18
|
+
# See Billing Requests: Overview
|
|
19
|
+
# (https://developer.gocardless.com/getting-started/billing-requests/overview/)
|
|
20
|
+
# for how-to's, explanations and tutorials. Important: All properties
|
|
21
|
+
# associated with `subscription_request` and `instalment_schedule_request`
|
|
22
|
+
# are only supported for ACH and PAD schemes.
|
|
24
23
|
class BillingRequest
|
|
25
24
|
attr_reader :actions
|
|
26
25
|
attr_reader :created_at
|
|
@@ -10,13 +10,13 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a billing_request_with_action resource returned from the API
|
|
12
12
|
|
|
13
|
-
#
|
|
14
|
-
#
|
|
13
|
+
# Billing Requests help create resources that require input or action from a
|
|
14
|
+
# customer. An example of required input might be additional customer
|
|
15
15
|
# billing details, while an action would be asking a customer to authorise a
|
|
16
16
|
# payment using their mobile banking app.
|
|
17
17
|
#
|
|
18
|
-
# See
|
|
19
|
-
#
|
|
18
|
+
# See Billing Requests: Overview
|
|
19
|
+
# (https://developer.gocardless.com/getting-started/billing-requests/overview/)
|
|
20
20
|
# for how-to's, explanations and tutorials.
|
|
21
21
|
class BillingRequestWithAction
|
|
22
22
|
attr_reader :bank_authorisations
|
|
@@ -31,9 +31,9 @@ module GoCardlessPro
|
|
|
31
31
|
#
|
|
32
32
|
# Please note:
|
|
33
33
|
#
|
|
34
|
-
#
|
|
34
|
+
# - Payments and subscriptions cannot be created against a mandate in
|
|
35
35
|
# blocked state.
|
|
36
|
-
#
|
|
36
|
+
# - A mandate can never be transitioned out of the blocked state.
|
|
37
37
|
#
|
|
38
38
|
# The one exception to this is when blocking a 'bank_name'. This block will
|
|
39
39
|
# prevent bank
|
|
@@ -43,11 +43,9 @@ module GoCardlessPro
|
|
|
43
43
|
# this block. Please
|
|
44
44
|
# be aware that we cannot always match a bank account to a given bank name.
|
|
45
45
|
#
|
|
46
|
-
# <p class="notice">
|
|
47
46
|
# This API is currently only available for GoCardless Protect+ integrators
|
|
48
|
-
# - please
|
|
49
|
-
#
|
|
50
|
-
# </p>
|
|
47
|
+
# - please get in touch (mailto:help@gocardless.com) if you would like to
|
|
48
|
+
# use this API.
|
|
51
49
|
class Block
|
|
52
50
|
attr_reader :active
|
|
53
51
|
attr_reader :block_type
|
|
@@ -10,10 +10,12 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a creditor resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Each
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
13
|
+
# Each payment
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-payments)
|
|
15
|
+
# taken through the API is linked to a "creditor", to whom the payment is
|
|
16
|
+
# then paid out. In most cases your organisation will have a single
|
|
17
|
+
# "creditor", but the API also supports collecting payments on behalf of
|
|
18
|
+
# others.
|
|
17
19
|
#
|
|
18
20
|
# Currently, for Anti Money Laundering reasons, any creditors you add must
|
|
19
21
|
# be directly related to your organisation.
|
|
@@ -10,9 +10,11 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a creditor_bank_account resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Creditor Bank Accounts hold the bank details of a
|
|
14
|
-
#
|
|
15
|
-
#
|
|
13
|
+
# Creditor Bank Accounts hold the bank details of a creditor
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-creditors).
|
|
15
|
+
# These are the bank accounts which your payouts
|
|
16
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-payouts)
|
|
17
|
+
# will be sent to.
|
|
16
18
|
#
|
|
17
19
|
# Note that creditor bank accounts must be unique, and so you will encounter
|
|
18
20
|
# a `bank_account_exists` error if you try to create a duplicate bank
|
|
@@ -20,8 +22,7 @@ module GoCardlessPro
|
|
|
20
22
|
# instead, the ID of which will be provided as
|
|
21
23
|
# `links[creditor_bank_account]` in the error response.
|
|
22
24
|
#
|
|
23
|
-
#
|
|
24
|
-
# available for partner integrations.</p>
|
|
25
|
+
# Restricted: This API is not available for partner integrations.
|
|
25
26
|
class CreditorBankAccount
|
|
26
27
|
attr_reader :account_holder_name
|
|
27
28
|
attr_reader :account_number_ending
|
|
@@ -11,9 +11,10 @@ module GoCardlessPro
|
|
|
11
11
|
# Represents an instance of a customer resource returned from the API
|
|
12
12
|
|
|
13
13
|
# Customer objects hold the contact details for a customer. A customer can
|
|
14
|
-
# have several
|
|
15
|
-
#
|
|
16
|
-
# several Direct Debit
|
|
14
|
+
# have several customer bank accounts
|
|
15
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-customer-bank-accounts),
|
|
16
|
+
# which in turn can have several Direct Debit mandates
|
|
17
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-mandates).
|
|
17
18
|
class Customer
|
|
18
19
|
attr_reader :address_line1
|
|
19
20
|
attr_reader :address_line2
|
|
@@ -10,10 +10,12 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a customer_bank_account resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Customer Bank Accounts hold the bank details of a
|
|
14
|
-
#
|
|
15
|
-
#
|
|
16
|
-
#
|
|
13
|
+
# Customer Bank Accounts hold the bank details of a customer
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-customers).
|
|
15
|
+
# They always belong to a customer
|
|
16
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-customers),
|
|
17
|
+
# and may be linked to several Direct Debit mandates
|
|
18
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-mandates).
|
|
17
19
|
#
|
|
18
20
|
# Note that customer bank accounts must be unique, and so you will encounter
|
|
19
21
|
# a `bank_account_exists` error if you try to create a duplicate bank
|
|
@@ -21,11 +23,10 @@ module GoCardlessPro
|
|
|
21
23
|
# instead, the ID of which will be provided as
|
|
22
24
|
# `links[customer_bank_account]` in the error response.
|
|
23
25
|
#
|
|
24
|
-
#
|
|
25
|
-
# first
|
|
26
|
+
# Note: To ensure the customer's bank accounts are valid, verify them first
|
|
26
27
|
# using
|
|
27
|
-
#
|
|
28
|
-
#
|
|
28
|
+
# bank_details_lookups
|
|
29
|
+
# (https://developer.gocardless.com/api-reference/#bank-details-lookups-perform-a-bank-details-lookup),
|
|
29
30
|
# before proceeding with creating the accounts
|
|
30
31
|
class CustomerBankAccount
|
|
31
32
|
attr_reader :account_holder_name
|
|
@@ -39,6 +40,8 @@ module GoCardlessPro
|
|
|
39
40
|
attr_reader :enabled
|
|
40
41
|
attr_reader :id
|
|
41
42
|
attr_reader :metadata
|
|
43
|
+
attr_reader :payer_name_verification_result
|
|
44
|
+
attr_reader :trusted_recipient
|
|
42
45
|
|
|
43
46
|
# Initialize a customer_bank_account resource instance
|
|
44
47
|
# @param object [Hash] an object returned from the API
|
|
@@ -57,6 +60,8 @@ module GoCardlessPro
|
|
|
57
60
|
@id = object['id']
|
|
58
61
|
@links = object['links']
|
|
59
62
|
@metadata = object['metadata']
|
|
63
|
+
@payer_name_verification_result = object['payer_name_verification_result']
|
|
64
|
+
@trusted_recipient = object['trusted_recipient']
|
|
60
65
|
@response = response
|
|
61
66
|
end
|
|
62
67
|
|
|
@@ -20,10 +20,9 @@ module GoCardlessPro
|
|
|
20
20
|
# actioned in some
|
|
21
21
|
# way, it is no longer visible using this API.
|
|
22
22
|
#
|
|
23
|
-
#
|
|
24
|
-
#
|
|
25
|
-
#
|
|
26
|
-
# use this API.</p>
|
|
23
|
+
# Restricted: This API is currently only available for approved integrators
|
|
24
|
+
# - please get in touch (mailto:help@gocardless.com) if you would like to
|
|
25
|
+
# use this API.
|
|
27
26
|
class CustomerNotification
|
|
28
27
|
attr_reader :action_taken
|
|
29
28
|
attr_reader :action_taken_at
|
|
@@ -14,8 +14,15 @@ module GoCardlessPro
|
|
|
14
14
|
# has been updated, for example a payment which has been collected, or a
|
|
15
15
|
# mandate which has been transferred. Event creation is an asynchronous
|
|
16
16
|
# process, so it can take some time between an action occurring and its
|
|
17
|
-
# corresponding event getting included in API responses. See
|
|
18
|
-
#
|
|
17
|
+
# corresponding event getting included in API responses. See here
|
|
18
|
+
# (https://developer.gocardless.com/api-reference/#event-types) for a
|
|
19
|
+
# complete list of event types.
|
|
20
|
+
#
|
|
21
|
+
# Important: Events older than 18 months will be archived and no longer
|
|
22
|
+
# accessible via the API or exports. Archival will begin no sooner than 1
|
|
23
|
+
# August 2026 in sandbox environments, and no sooner than 1 October 2026 in
|
|
24
|
+
# live environments. Events within the 18-month window are unaffected. If
|
|
25
|
+
# you need archived data, contact GoCardless support.
|
|
19
26
|
class Event
|
|
20
27
|
attr_reader :action
|
|
21
28
|
attr_reader :created_at
|
|
@@ -132,6 +139,10 @@ module GoCardlessPro
|
|
|
132
139
|
@links['payment']
|
|
133
140
|
end
|
|
134
141
|
|
|
142
|
+
def payment_account_transaction
|
|
143
|
+
@links['payment_account_transaction']
|
|
144
|
+
end
|
|
145
|
+
|
|
135
146
|
def payment_request_payment
|
|
136
147
|
@links['payment_request_payment']
|
|
137
148
|
end
|
|
@@ -15,6 +15,7 @@ module GoCardlessPro
|
|
|
15
15
|
attr_reader :created_at
|
|
16
16
|
attr_reader :currency
|
|
17
17
|
attr_reader :download_url
|
|
18
|
+
attr_reader :error_message
|
|
18
19
|
attr_reader :export_type
|
|
19
20
|
attr_reader :id
|
|
20
21
|
|
|
@@ -26,6 +27,7 @@ module GoCardlessPro
|
|
|
26
27
|
@created_at = object['created_at']
|
|
27
28
|
@currency = object['currency']
|
|
28
29
|
@download_url = object['download_url']
|
|
30
|
+
@error_message = object['error_message']
|
|
29
31
|
@export_type = object['export_type']
|
|
30
32
|
@id = object['id']
|
|
31
33
|
@response = response
|
|
@@ -10,9 +10,9 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a institution resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Institutions that are supported when creating
|
|
14
|
-
#
|
|
15
|
-
# country or purpose.
|
|
13
|
+
# Institutions that are supported when creating Bank Authorisations
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#billing-requests-bank-authorisations)
|
|
15
|
+
# for a particular country or purpose.
|
|
16
16
|
#
|
|
17
17
|
# Not all institutions support both Payment Initiation (PIS) and Account
|
|
18
18
|
# Information (AIS) services.
|
|
@@ -11,7 +11,8 @@ module GoCardlessPro
|
|
|
11
11
|
# Represents an instance of a logo resource returned from the API
|
|
12
12
|
|
|
13
13
|
# Logos are image uploads that, when associated with a creditor, are shown
|
|
14
|
-
# on the
|
|
14
|
+
# on the billing request flow
|
|
15
|
+
# (https://developer.gocardless.com/api-reference/#billing-requests-billing-request-flows)
|
|
15
16
|
# payment pages.
|
|
16
17
|
class Logo
|
|
17
18
|
attr_reader :id
|
|
@@ -10,11 +10,12 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a mandate resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Mandates represent the Direct Debit mandate with a
|
|
14
|
-
#
|
|
13
|
+
# Mandates represent the Direct Debit mandate with a customer
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-customers).
|
|
15
15
|
#
|
|
16
|
-
# GoCardless will notify you via a
|
|
17
|
-
#
|
|
16
|
+
# GoCardless will notify you via a webhook
|
|
17
|
+
# (https://developer.gocardless.com/api-reference/#appendix-webhooks)
|
|
18
|
+
# whenever the status of a mandate changes.
|
|
18
19
|
class Mandate
|
|
19
20
|
attr_reader :authorisation_source
|
|
20
21
|
attr_reader :consent_parameters
|
|
@@ -22,6 +23,7 @@ module GoCardlessPro
|
|
|
22
23
|
attr_reader :created_at
|
|
23
24
|
attr_reader :funds_settlement
|
|
24
25
|
attr_reader :id
|
|
26
|
+
attr_reader :mandate_type
|
|
25
27
|
attr_reader :metadata
|
|
26
28
|
attr_reader :next_possible_charge_date
|
|
27
29
|
attr_reader :next_possible_standard_ach_charge_date
|
|
@@ -43,6 +45,7 @@ module GoCardlessPro
|
|
|
43
45
|
@funds_settlement = object['funds_settlement']
|
|
44
46
|
@id = object['id']
|
|
45
47
|
@links = object['links']
|
|
48
|
+
@mandate_type = object['mandate_type']
|
|
46
49
|
@metadata = object['metadata']
|
|
47
50
|
@next_possible_charge_date = object['next_possible_charge_date']
|
|
48
51
|
@next_possible_standard_ach_charge_date = object['next_possible_standard_ach_charge_date']
|
|
@@ -16,16 +16,19 @@ module GoCardlessPro
|
|
|
16
16
|
#
|
|
17
17
|
# The process is as follows:
|
|
18
18
|
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
19
|
+
# 1. Create a mandate import
|
|
20
|
+
# (https://developer.gocardless.com/api-reference/#mandate-imports-create-a-new-mandate-import)
|
|
21
|
+
# 2. Add entries
|
|
22
|
+
# (https://developer.gocardless.com/api-reference/#mandate-import-entries-add-a-mandate-import-entry)
|
|
23
|
+
# to the import
|
|
24
|
+
# 3. Submit
|
|
25
|
+
# (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import)
|
|
22
26
|
# the import
|
|
23
|
-
#
|
|
24
|
-
# 4. Wait until a member of the GoCardless team approves the import, at
|
|
27
|
+
# 4. Wait until a member of the GoCardless team approves the import, at
|
|
25
28
|
# which point the mandates will be created
|
|
26
|
-
#
|
|
27
|
-
#
|
|
28
|
-
# system
|
|
29
|
+
# 5. Link up the mandates
|
|
30
|
+
# (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries)
|
|
31
|
+
# in your system
|
|
29
32
|
#
|
|
30
33
|
# When you add entries to your mandate import, they are not turned into
|
|
31
34
|
# actual mandates
|
|
@@ -36,22 +39,23 @@ module GoCardlessPro
|
|
|
36
39
|
#
|
|
37
40
|
# We will issue a `mandate_created` webhook for each entry, which will be
|
|
38
41
|
# the same as the webhooks
|
|
39
|
-
# triggered when
|
|
40
|
-
#
|
|
42
|
+
# triggered when creating a mandate
|
|
43
|
+
# (https://developer.gocardless.com/api-reference/#mandates-create-a-mandate)
|
|
44
|
+
# using the mandates API. Once these
|
|
41
45
|
# webhooks start arriving, any reconciliation can now be accomplished by
|
|
42
|
-
#
|
|
43
|
-
#
|
|
44
|
-
#
|
|
45
|
-
# system
|
|
46
|
+
# checking the current status
|
|
47
|
+
# (https://developer.gocardless.com/api-reference/#mandate-imports-get-a-mandate-import)
|
|
48
|
+
# of the mandate import and
|
|
49
|
+
# linking up the mandates to your system
|
|
50
|
+
# (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries).
|
|
46
51
|
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
52
|
+
# Note that all Mandate Imports have an upper limit of 30,000 entries, so we
|
|
53
|
+
# recommend you split your import into several smaller imports if you're
|
|
54
|
+
# planning to exceed this threshold.
|
|
50
55
|
#
|
|
51
|
-
#
|
|
52
|
-
#
|
|
53
|
-
#
|
|
54
|
-
# use this API.</p>
|
|
56
|
+
# Restricted: This API is currently only available for approved integrators
|
|
57
|
+
# - please get in touch (mailto:help@gocardless.com) if you would like to
|
|
58
|
+
# use this API.
|
|
55
59
|
class MandateImport
|
|
56
60
|
attr_reader :created_at
|
|
57
61
|
attr_reader :id
|
|
@@ -10,36 +10,33 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a mandate_import_entry resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Mandate Import Entries are added to a
|
|
14
|
-
#
|
|
13
|
+
# Mandate Import Entries are added to a Mandate Import
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports).
|
|
15
15
|
# Each entry corresponds to one mandate to be imported into GoCardless.
|
|
16
16
|
#
|
|
17
17
|
# To import a mandate you will need:
|
|
18
|
-
#
|
|
19
|
-
#
|
|
20
|
-
#
|
|
21
|
-
#
|
|
22
|
-
#
|
|
23
|
-
# details
|
|
24
|
-
# <li>Amendment details (SEPA only)</li>
|
|
25
|
-
# </ol>
|
|
18
|
+
#
|
|
19
|
+
# 1. Identifying information about the customer (name/company and address)
|
|
20
|
+
# 2. Bank account details, consisting of an account holder name and
|
|
21
|
+
# either an IBAN or local bank details
|
|
22
|
+
# (https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
|
|
23
|
+
# 3. Amendment details (SEPA only)
|
|
26
24
|
#
|
|
27
25
|
# We suggest you provide a `record_identifier` (which is unique within the
|
|
28
26
|
# context of a
|
|
29
27
|
# single mandate import) to help you to identify mandates that have been
|
|
30
28
|
# created once the
|
|
31
29
|
# import has been processed by GoCardless. You can
|
|
32
|
-
#
|
|
33
|
-
#
|
|
30
|
+
# list the mandate import entries
|
|
31
|
+
# (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries),
|
|
34
32
|
# match them up in your system using the `record_identifier`, and look at
|
|
35
33
|
# the `links`
|
|
36
34
|
# fields to find the mandate, customer and customer bank account that have
|
|
37
35
|
# been imported.
|
|
38
36
|
#
|
|
39
|
-
#
|
|
40
|
-
#
|
|
41
|
-
#
|
|
42
|
-
# use this API.</p>
|
|
37
|
+
# Restricted: This API is currently only available for approved integrators
|
|
38
|
+
# - please get in touch (mailto:help@gocardless.com) if you would like to
|
|
39
|
+
# use this API.
|
|
43
40
|
class MandateImportEntry
|
|
44
41
|
attr_reader :created_at
|
|
45
42
|
attr_reader :processing_errors
|
|
@@ -10,9 +10,9 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a mandate_pdf resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Mandate PDFs allow you to easily display
|
|
14
|
-
#
|
|
15
|
-
# your customers.
|
|
13
|
+
# Mandate PDFs allow you to easily display scheme-rules compliant
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#appendix-compliance-requirements)
|
|
15
|
+
# Direct Debit mandates to your customers.
|
|
16
16
|
class MandatePdf
|
|
17
17
|
attr_reader :expires_at
|
|
18
18
|
attr_reader :url
|
|
@@ -14,7 +14,6 @@ module GoCardlessPro
|
|
|
14
14
|
# which refunds are not permitted. The default limit is zero — refunds are
|
|
15
15
|
# not permitted if the creditor has a negative balance. The limit can be
|
|
16
16
|
# changed on a per-creditor basis.
|
|
17
|
-
#
|
|
18
17
|
class NegativeBalanceLimit
|
|
19
18
|
attr_reader :balance_limit
|
|
20
19
|
attr_reader :created_at
|
|
@@ -10,15 +10,18 @@ module GoCardlessPro
|
|
|
10
10
|
module Resources
|
|
11
11
|
# Represents an instance of a outbound_payment resource returned from the API
|
|
12
12
|
|
|
13
|
-
# Outbound Payments represent payments sent from
|
|
14
|
-
#
|
|
13
|
+
# Outbound Payments represent payments sent from creditors
|
|
14
|
+
# (https://developer.gocardless.com/api-reference/#core-endpoints-creditors).
|
|
15
15
|
#
|
|
16
|
-
# GoCardless will notify you via a
|
|
17
|
-
#
|
|
16
|
+
# GoCardless will notify you via a webhook
|
|
17
|
+
# (https://developer.gocardless.com/api-reference/#appendix-webhooks) when
|
|
18
|
+
# the status of the outbound payment changes
|
|
19
|
+
# (https://developer.gocardless.com/api-reference/#event-types-outbound-payment).
|
|
18
20
|
#
|
|
19
21
|
# ####Rate limiting
|
|
20
22
|
#
|
|
21
23
|
# Two rate limits apply to the Outbound Payments APIs:
|
|
24
|
+
#
|
|
22
25
|
# - All POST Outbound Payment endpoints (create, withdraw, approve, cancel
|
|
23
26
|
# and etc.) share a single rate-limit group of 300 requests per minute. As
|
|
24
27
|
# initiating a payment typically requires two API calls (one to create the
|
|
@@ -88,6 +91,10 @@ module GoCardlessPro
|
|
|
88
91
|
@links['customer']
|
|
89
92
|
end
|
|
90
93
|
|
|
94
|
+
def outbound_payment_import
|
|
95
|
+
@links['outbound_payment_import']
|
|
96
|
+
end
|
|
97
|
+
|
|
91
98
|
def recipient_bank_account
|
|
92
99
|
@links['recipient_bank_account']
|
|
93
100
|
end
|