Class: GoCardlessPro::Resources::PaymentAccount
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::PaymentAccount
- Defined in:
- lib/gocardless_pro/resources/payment_account.rb
Overview
Access the details of bank accounts provided for you by GoCardless that are used to fund Outbound Payments (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments).
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#account_balance ⇒ Object
readonly
Returns the value of attribute account_balance.
-
#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.
-
#bank_name ⇒ Object
readonly
Returns the value of attribute bank_name.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ PaymentAccount
constructor
Initialize a payment_account resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the payment_account resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ PaymentAccount
Initialize a payment_account resource instance
26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 26 def initialize(object, response = nil) @object = object @account_balance = object['account_balance'] @account_holder_name = object['account_holder_name'] @account_number_ending = object['account_number_ending'] @bank_name = object['bank_name'] @currency = object['currency'] @id = object['id'] @links = object['links'] @response = response end |
Instance Attribute Details
#account_balance ⇒ Object (readonly)
Returns the value of attribute account_balance.
17 18 19 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 17 def account_balance @account_balance end |
#account_holder_name ⇒ Object (readonly)
Returns the value of attribute account_holder_name.
18 19 20 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 18 def account_holder_name @account_holder_name end |
#account_number_ending ⇒ Object (readonly)
Returns the value of attribute account_number_ending.
19 20 21 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 19 def account_number_ending @account_number_ending end |
#bank_name ⇒ Object (readonly)
Returns the value of attribute bank_name.
20 21 22 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 20 def bank_name @bank_name end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
21 22 23 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 21 def currency @currency end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
22 23 24 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 22 def id @id end |
Instance Method Details
#api_response ⇒ Object
39 40 41 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 39 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
44 45 46 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 44 def links @payment_account_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the payment_account resource as a hash of all its readable attributes
49 50 51 |
# File 'lib/gocardless_pro/resources/payment_account.rb', line 49 def to_h @object end |