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.
Files changed (87) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -0
  3. data/lib/gocardless_pro/client.rb +11 -1
  4. data/lib/gocardless_pro/list_response.rb +2 -2
  5. data/lib/gocardless_pro/resources/billing_request.rb +7 -8
  6. data/lib/gocardless_pro/resources/billing_request_with_action.rb +4 -4
  7. data/lib/gocardless_pro/resources/block.rb +4 -6
  8. data/lib/gocardless_pro/resources/creditor.rb +6 -4
  9. data/lib/gocardless_pro/resources/creditor_bank_account.rb +6 -5
  10. data/lib/gocardless_pro/resources/customer.rb +4 -3
  11. data/lib/gocardless_pro/resources/customer_bank_account.rb +13 -8
  12. data/lib/gocardless_pro/resources/customer_notification.rb +3 -4
  13. data/lib/gocardless_pro/resources/event.rb +13 -2
  14. data/lib/gocardless_pro/resources/export.rb +2 -0
  15. data/lib/gocardless_pro/resources/instalment_schedule.rb +0 -1
  16. data/lib/gocardless_pro/resources/institution.rb +3 -3
  17. data/lib/gocardless_pro/resources/logo.rb +2 -1
  18. data/lib/gocardless_pro/resources/mandate.rb +7 -4
  19. data/lib/gocardless_pro/resources/mandate_import.rb +25 -21
  20. data/lib/gocardless_pro/resources/mandate_import_entry.rb +13 -16
  21. data/lib/gocardless_pro/resources/mandate_pdf.rb +3 -3
  22. data/lib/gocardless_pro/resources/negative_balance_limit.rb +0 -1
  23. data/lib/gocardless_pro/resources/outbound_payment.rb +11 -4
  24. data/lib/gocardless_pro/resources/outbound_payment_import.rb +81 -0
  25. data/lib/gocardless_pro/resources/outbound_payment_import_entry.rb +77 -0
  26. data/lib/gocardless_pro/resources/payer_authorisation.rb +27 -31
  27. data/lib/gocardless_pro/resources/payment.rb +9 -6
  28. data/lib/gocardless_pro/resources/payment_account.rb +2 -1
  29. data/lib/gocardless_pro/resources/payment_account_transaction.rb +2 -1
  30. data/lib/gocardless_pro/resources/payout.rb +7 -6
  31. data/lib/gocardless_pro/resources/payout_item.rb +1 -2
  32. data/lib/gocardless_pro/resources/redirect_flow.rb +34 -23
  33. data/lib/gocardless_pro/resources/refund.rb +8 -6
  34. data/lib/gocardless_pro/resources/scheme_identifier.rb +0 -1
  35. data/lib/gocardless_pro/resources/subscription.rb +17 -14
  36. data/lib/gocardless_pro/resources/tax_rate.rb +2 -2
  37. data/lib/gocardless_pro/resources/verification_detail.rb +10 -6
  38. data/lib/gocardless_pro/services/balances_service.rb +11 -3
  39. data/lib/gocardless_pro/services/bank_account_details_service.rb +10 -4
  40. data/lib/gocardless_pro/services/bank_account_holder_verifications_service.rb +7 -1
  41. data/lib/gocardless_pro/services/bank_authorisations_service.rb +7 -1
  42. data/lib/gocardless_pro/services/bank_details_lookups_service.rb +14 -6
  43. data/lib/gocardless_pro/services/billing_request_flows_service.rb +7 -1
  44. data/lib/gocardless_pro/services/billing_request_templates_service.rb +10 -3
  45. data/lib/gocardless_pro/services/billing_request_with_actions_service.rb +7 -1
  46. data/lib/gocardless_pro/services/billing_requests_service.rb +18 -13
  47. data/lib/gocardless_pro/services/blocks_service.rb +10 -3
  48. data/lib/gocardless_pro/services/creditor_bank_accounts_service.rb +10 -3
  49. data/lib/gocardless_pro/services/creditors_service.rb +10 -3
  50. data/lib/gocardless_pro/services/currency_exchange_rates_service.rb +10 -3
  51. data/lib/gocardless_pro/services/customer_bank_accounts_service.rb +20 -10
  52. data/lib/gocardless_pro/services/customer_notifications_service.rb +7 -2
  53. data/lib/gocardless_pro/services/customers_service.rb +11 -5
  54. data/lib/gocardless_pro/services/events_service.rb +15 -3
  55. data/lib/gocardless_pro/services/exports_service.rb +7 -1
  56. data/lib/gocardless_pro/services/funds_availabilities_service.rb +7 -1
  57. data/lib/gocardless_pro/services/instalment_schedules_service.rb +15 -7
  58. data/lib/gocardless_pro/services/institutions_service.rb +7 -1
  59. data/lib/gocardless_pro/services/logos_service.rb +9 -3
  60. data/lib/gocardless_pro/services/mandate_import_entries_service.rb +10 -4
  61. data/lib/gocardless_pro/services/mandate_imports_service.rb +10 -2
  62. data/lib/gocardless_pro/services/mandate_pdfs_service.rb +11 -5
  63. data/lib/gocardless_pro/services/mandates_service.rb +16 -9
  64. data/lib/gocardless_pro/services/negative_balance_limits_service.rb +10 -3
  65. data/lib/gocardless_pro/services/outbound_payment_import_entries_service.rb +64 -0
  66. data/lib/gocardless_pro/services/outbound_payment_imports_service.rb +118 -0
  67. data/lib/gocardless_pro/services/outbound_payments_service.rb +11 -4
  68. data/lib/gocardless_pro/services/payer_authorisations_service.rb +11 -8
  69. data/lib/gocardless_pro/services/payer_themes_service.rb +7 -1
  70. data/lib/gocardless_pro/services/payment_account_transactions_service.rb +34 -7
  71. data/lib/gocardless_pro/services/payment_accounts_service.rb +10 -3
  72. data/lib/gocardless_pro/services/payments_service.rb +22 -14
  73. data/lib/gocardless_pro/services/payout_items_service.rb +12 -7
  74. data/lib/gocardless_pro/services/payouts_service.rb +12 -5
  75. data/lib/gocardless_pro/services/redirect_flows_service.rb +15 -5
  76. data/lib/gocardless_pro/services/refunds_service.rb +15 -10
  77. data/lib/gocardless_pro/services/scenario_simulators_service.rb +85 -82
  78. data/lib/gocardless_pro/services/scheme_identifiers_service.rb +13 -7
  79. data/lib/gocardless_pro/services/subscriptions_service.rb +48 -38
  80. data/lib/gocardless_pro/services/tax_rates_service.rb +10 -3
  81. data/lib/gocardless_pro/services/transferred_mandates_service.rb +7 -1
  82. data/lib/gocardless_pro/services/verification_details_service.rb +7 -1
  83. data/lib/gocardless_pro/services/webhooks_service.rb +10 -3
  84. data/lib/gocardless_pro/version.rb +1 -1
  85. data/lib/gocardless_pro/webhook.rb +45 -0
  86. data/lib/gocardless_pro.rb +6 -0
  87. metadata +7 -7
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 52c8eb47da5317720b3527b44e2897d64a4f1ca2ad7c85c8ee15bfb753291e3f
4
- data.tar.gz: 114e42e6b542344d4f335f1e6709bcc6e8631e3d8811f4a49e7419e0fd78aa9f
3
+ metadata.gz: 391ae6d45356b902c0a936c5bb167740fd9415d1213c146fd0ba9bdd5416cc4c
4
+ data.tar.gz: cea405daca5960666de0eb79eaee3d963a1b3fba19df415cfef9f9e755ca719f
5
5
  SHA512:
6
- metadata.gz: bc873ef338b211e379cbb8256342d1c35131bce737643f7555c3ccaa570e53f0e3b2eda494f405add95316f886bb87f0ef68ca211dad80aecf8a09c023445f69
7
- data.tar.gz: f75b2d5745317a0f93ea0582fda2f63830f495cb5239af0658330799907ff5bdf189fed85f533f5e5576c38353a36b5f5611899b4f75b6ca5ef3c97dfb1e37c3
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.3.0',
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['meta']['cursors']['before']
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['meta']['cursors']['after']
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
- # Billing Requests help create resources that require input or action from
14
- # a customer. An example of required input might be additional customer
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 [Billing Requests:
19
- # Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/)
20
- # for how-to's, explanations and tutorials. <p
21
- # class="notice"><strong>Important</strong>: All properties associated with
22
- # `subscription_request` and `instalment_schedule_request` are only
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
- # Billing Requests help create resources that require input or action from
14
- # a customer. An example of required input might be additional customer
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 [Billing Requests:
19
- # Overview](https://developer.gocardless.com/getting-started/billing-requests/overview/)
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
- # - Payments and subscriptions cannot be created against a mandate in
34
+ # - Payments and subscriptions cannot be created against a mandate in
35
35
  # blocked state.
36
- # - A mandate can never be transitioned out of the blocked state.
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 <a href="mailto:help@gocardless.com">get in touch</a> if you
49
- # would like to use this API.
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 [payment](#core-endpoints-payments) taken through the API is linked
14
- # to a "creditor", to whom the payment is then paid out. In most cases your
15
- # organisation will have a single "creditor", but the API also supports
16
- # collecting payments on behalf of others.
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
- # [creditor](#core-endpoints-creditors). These are the bank accounts which
15
- # your [payouts](#core-endpoints-payouts) will be sent to.
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
- # <p class="restricted-notice"><strong>Restricted</strong>: This API is not
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 [customer bank
15
- # accounts](#core-endpoints-customer-bank-accounts), which in turn can have
16
- # several Direct Debit [mandates](#core-endpoints-mandates).
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
- # [customer](#core-endpoints-customers). They always belong to a
15
- # [customer](#core-endpoints-customers), and may be linked to several Direct
16
- # Debit [mandates](#core-endpoints-mandates).
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
- # _Note:_ To ensure the customer's bank accounts are valid, verify them
25
- # first
26
+ # Note: To ensure the customer's bank accounts are valid, verify them first
26
27
  # using
27
- #
28
- # [bank_details_lookups](#bank-details-lookups-perform-a-bank-details-lookup),
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
- # <p class="restricted-notice"><strong>Restricted</strong>: This API is
24
- # currently only available for approved integrators - please <a
25
- # href="mailto:help@gocardless.com">get in touch</a> if you would like to
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
- # [here](#event-types) for a complete list of event types.
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
@@ -26,7 +26,6 @@ module GoCardlessPro
26
26
  #
27
27
  # Customers will receive a single notification about the complete schedule
28
28
  # of collection.
29
- #
30
29
  class InstalmentSchedule
31
30
  attr_reader :created_at
32
31
  attr_reader :currency
@@ -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 [Bank
14
- # Authorisations](#billing-requests-bank-authorisations) for a particular
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 [billing request flow](#billing-requests-billing-request-flows)
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
- # [customer](#core-endpoints-customers).
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 [webhook](#appendix-webhooks) whenever
17
- # the status of a mandate changes.
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
- # 1. [Create a mandate
20
- # import](#mandate-imports-create-a-new-mandate-import)
21
- # 2. [Add entries](#mandate-import-entries-add-a-mandate-import-entry) to
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
- # 3. [Submit](#mandate-imports-submit-a-mandate-import) the import
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
- # 5. [Link up the
27
- # mandates](#mandate-import-entries-list-all-mandate-import-entries) in your
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 [ creating a mandate ](#mandates-create-a-mandate) using
40
- # the mandates API. Once these
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
- # [checking the current status](#mandate-imports-get-a-mandate-import) of
43
- # the mandate import and
44
- # [linking up the mandates to your
45
- # system](#mandate-import-entries-list-all-mandate-import-entries).
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
- # <p class="notice">Note that all Mandate Imports have an upper limit of
48
- # 30,000 entries, so we recommend you split your import into several smaller
49
- # imports if you're planning to exceed this threshold.</p>
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
- # <p class="restricted-notice"><strong>Restricted</strong>: This API is
52
- # currently only available for approved integrators - please <a
53
- # href="mailto:help@gocardless.com">get in touch</a> if you would like to
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 [Mandate
14
- # Import](#core-endpoints-mandate-imports).
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
- # <ol>
19
- # <li>Identifying information about the customer (name/company and
20
- # address)</li>
21
- # <li>Bank account details, consisting of an account holder name and
22
- # either an IBAN or <a href="#appendix-local-bank-details">local bank
23
- # details</a></li>
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
- # [list the mandate import
33
- # entries](#mandate-import-entries-list-all-mandate-import-entries),
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
- # <p class="restricted-notice"><strong>Restricted</strong>: This API is
40
- # currently only available for approved integrators - please <a
41
- # href="mailto:help@gocardless.com">get in touch</a> if you would like to
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 [scheme-rules
14
- # compliant](#appendix-compliance-requirements) Direct Debit mandates to
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
- # [creditors](#core-endpoints-creditors).
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 [webhook](#appendix-webhooks) when the
17
- # status of the outbound payment [changes](#event-types-outbound-payment).
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