Class: GoCardlessPro::Resources::MandateImport
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::MandateImport
- Defined in:
- lib/gocardless_pro/resources/mandate_import.rb
Overview
Mandate Imports allow you to migrate existing mandates from other providers into the GoCardless platform.
The process is as follows:
- Create a mandate import (https://developer.gocardless.com/api-reference/#mandate-imports-create-a-new-mandate-import)
- Add entries (https://developer.gocardless.com/api-reference/#mandate-import-entries-add-a-mandate-import-entry) to the import
- Submit (https://developer.gocardless.com/api-reference/#mandate-imports-submit-a-mandate-import) the import
- Wait until a member of the GoCardless team approves the import, at which point the mandates will be created
- Link up the mandates (https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries) in your system
When you add entries to your mandate import, they are not turned into actual mandates until the mandate import is submitted by you via the API, and then processed by a member of the GoCardless team. When that happens, a mandate will be created for each entry in the import.
We will issue a mandate_created webhook for each entry, which will be
the same as the webhooks
triggered when creating a mandate
(https://developer.gocardless.com/api-reference/#mandates-create-a-mandate)
using the mandates API. Once these
webhooks start arriving, any reconciliation can now be accomplished by
checking the current status
(https://developer.gocardless.com/api-reference/#mandate-imports-get-a-mandate-import)
of the mandate import and
linking up the mandates to your system
(https://developer.gocardless.com/api-reference/#mandate-import-entries-list-all-mandate-import-entries).
Note that all Mandate Imports have an upper limit of 30,000 entries, so we recommend you split your import into several smaller imports if you're planning to exceed this threshold.
Restricted: This API is currently only available for approved integrators
- please get in touch (mailto:help@gocardless.com) if you would like to use this API.
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#scheme ⇒ Object
readonly
Returns the value of attribute scheme.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ MandateImport
constructor
Initialize a mandate_import resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the mandate_import resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ MandateImport
Initialize a mandate_import resource instance
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 67 def initialize(object, response = nil) @object = object @created_at = object['created_at'] @id = object['id'] @links = object['links'] @scheme = object['scheme'] @status = object['status'] @response = response end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
60 61 62 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 60 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
61 62 63 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 61 def id @id end |
#scheme ⇒ Object (readonly)
Returns the value of attribute scheme.
62 63 64 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 62 def scheme @scheme end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
63 64 65 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 63 def status @status end |
Instance Method Details
#api_response ⇒ Object
78 79 80 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 78 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
83 84 85 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 83 def links @mandate_import_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the mandate_import resource as a hash of all its readable attributes
88 89 90 |
# File 'lib/gocardless_pro/resources/mandate_import.rb', line 88 def to_h @object end |