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 (https://developer.gocardless.com/api-reference/#core-endpoints-mandate-imports). Each entry corresponds to one mandate to be imported into GoCardless.
To import a mandate you will need:
- Identifying information about the customer (name/company and address)
- Bank account details, consisting of an account holder name and either an IBAN or local bank details (https://developer.gocardless.com/api-reference/#appendix-local-bank-details)
- Amendment details (SEPA only)
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
(https://developer.gocardless.com/api-reference/#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.
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.
-
#processing_errors ⇒ Object
readonly
Returns the value of attribute processing_errors.
-
#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
47 48 49 50 51 52 53 54 55 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 47 def initialize(object, response = nil) @object = object @created_at = object['created_at'] @links = object['links'] @processing_errors = object['processing_errors'] @record_identifier = object['record_identifier'] @response = response end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
41 42 43 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 41 def created_at @created_at end |
#processing_errors ⇒ Object (readonly)
Returns the value of attribute processing_errors.
42 43 44 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 42 def processing_errors @processing_errors end |
#record_identifier ⇒ Object (readonly)
Returns the value of attribute record_identifier.
43 44 45 |
# File 'lib/gocardless_pro/resources/mandate_import_entry.rb', line 43 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 |