class GoCardlessPro::Resources::CreditorBankAccount
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>
Attributes
Public Class Methods
Source
# 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
Initialize a creditor_bank_account resource instance @param object [Hash] an object returned from the API
Public Instance Methods
Source
# File lib/gocardless_pro/resources/creditor_bank_account.rb, line 49 def api_response ApiResponse.new(@response) end
Source
# File lib/gocardless_pro/resources/creditor_bank_account.rb, line 54 def links @creditor_bank_account_links ||= Links.new(@links) end
Return the links that the resource has
Source
# File lib/gocardless_pro/resources/creditor_bank_account.rb, line 59 def to_h @object end
Provides the creditor_bank_account resource as a hash of all its readable attributes