Class: GoCardlessPro::Resources::CreditorBankAccount
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::CreditorBankAccount
- Defined in:
- lib/gocardless_pro/resources/creditor_bank_account.rb
Overview
Creditor Bank Accounts hold the bank details of a [creditor](#core-endpoints-creditors). These are the bank accounts which your [payouts](#core-endpoints-payouts) will be sent to.
Note that creditor bank accounts must be unique, and so you will encounter a ‘bank_account_exists` error if you try to create a duplicate bank account. You may wish to handle this by updating the existing record instead, the ID of which will be provided as `links` in the error response.
<p class=“restricted-notice”><strong>Restricted</strong>: This API is not available for partner integrations.</p>
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#account_holder_name ⇒ Object
readonly
Returns the value of attribute account_holder_name.
-
#account_number_ending ⇒ Object
readonly
Returns the value of attribute account_number_ending.
-
#account_type ⇒ Object
readonly
Returns the value of attribute account_type.
-
#bank_name ⇒ Object
readonly
Returns the value of attribute bank_name.
-
#country_code ⇒ Object
readonly
Returns the value of attribute country_code.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#enabled ⇒ Object
readonly
Returns the value of attribute enabled.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#verification_status ⇒ Object
readonly
Returns the value of attribute verification_status.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ CreditorBankAccount
constructor
Initialize a creditor_bank_account resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the creditor_bank_account resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ CreditorBankAccount
Initialize a creditor_bank_account resource instance
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 31 def initialize(object, response = nil) @object = object @account_holder_name = object['account_holder_name'] @account_number_ending = object['account_number_ending'] @account_type = object['account_type'] @bank_name = object['bank_name'] @country_code = object['country_code'] @created_at = object['created_at'] @currency = object['currency'] @enabled = object['enabled'] @id = object['id'] @links = object['links'] @metadata = object['metadata'] @verification_status = object['verification_status'] @response = response end |
Instance Attribute Details
#account_holder_name ⇒ Object (readonly)
Returns the value of attribute account_holder_name.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def account_holder_name @account_holder_name end |
#account_number_ending ⇒ Object (readonly)
Returns the value of attribute account_number_ending.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def account_number_ending @account_number_ending end |
#account_type ⇒ Object (readonly)
Returns the value of attribute account_type.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def account_type @account_type end |
#bank_name ⇒ Object (readonly)
Returns the value of attribute bank_name.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def bank_name @bank_name end |
#country_code ⇒ Object (readonly)
Returns the value of attribute country_code.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def country_code @country_code end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def created_at @created_at end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def currency @currency end |
#enabled ⇒ Object (readonly)
Returns the value of attribute enabled.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def enabled @enabled end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def id @id end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def @metadata end |
#verification_status ⇒ Object (readonly)
Returns the value of attribute verification_status.
26 27 28 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 26 def verification_status @verification_status end |
Instance Method Details
#api_response ⇒ Object
49 50 51 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 49 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
54 55 56 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 54 def links @creditor_bank_account_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the creditor_bank_account resource as a hash of all its readable attributes
59 60 61 |
# File 'lib/gocardless_pro/resources/creditor_bank_account.rb', line 59 def to_h @object end |