Class: GoCardlessPro::Resources::MandateImportEntry
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::MandateImportEntry
- Defined in:
- lib/gocardless_pro/resources/mandate_import_entry.rb
Overview
Mandate Import Entries are added to a [Mandate Import](#core-endpoints-mandate-imports). Each entry corresponds to one mandate to be imported into GoCardless.
To import a mandate you will need: <ol>
<li>Identifying information about the customer (name/company and
address)</li>
<li>Bank account details, consisting of an account holder name and
either an IBAN or <a href="#appendix-local-bank-details">local bank
details</a></li>
<li>Amendment details (SEPA only)</li>
</ol>
We suggest you provide a ‘record_identifier` (which is unique within the context of a single mandate import) to help you to identify mandates that have been created once the import has been processed by GoCardless. You can [list the mandate import entries](#mandate-import-entries-list-all-mandate-import-entries), match them up in your system using the `record_identifier`, and look at the `links` fields to find the mandate, customer and customer bank account that have been imported.
<p class=“restricted-notice”><strong>Restricted</strong>: This API is currently only available for approved integrators - please <a href=“[email protected]”>get in touch</a> if you would like to use this API.</p>
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#record_identifier ⇒ Object
readonly
Returns the value of attribute record_identifier.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ MandateImportEntry
constructor
Initialize a mandate_import_entry resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the mandate_import_entry resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ MandateImportEntry
Initialize a mandate_import_entry resource instance
48 49 50 51 52 53 54 55 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 48 def initialize(object, response = nil) @object = object @created_at = object['created_at'] @links = object['links'] @record_identifier = object['record_identifier'] @response = response end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
44 45 46 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 44 def created_at @created_at end |
#record_identifier ⇒ Object (readonly)
Returns the value of attribute record_identifier.
44 45 46 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 44 def record_identifier @record_identifier end |
Instance Method Details
#api_response ⇒ Object
57 58 59 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 57 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
62 63 64 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 62 def links @mandate_import_entry_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the mandate_import_entry resource as a hash of all its readable attributes
67 68 69 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 67 def to_h @object end |