Class: GoCardlessPro::Resources::PaymentAccountTransaction
- Inherits:
-
Object
- Object
- GoCardlessPro::Resources::PaymentAccountTransaction
- Defined in:
- lib/gocardless_pro/resources/payment_account_transaction.rb
Overview
Payment account transactions represent movements of funds on a given payment account. The payment account is provisioned by GoCardless and is used to fund outbound payments (https://developer.gocardless.com/api-reference/#core-endpoints-outbound-payments).
Defined Under Namespace
Classes: Links
Instance Attribute Summary collapse
-
#amount ⇒ Object
readonly
Returns the value of attribute amount.
-
#balance_after_transaction ⇒ Object
readonly
Returns the value of attribute balance_after_transaction.
-
#counterparty_name ⇒ Object
readonly
Returns the value of attribute counterparty_name.
-
#currency ⇒ Object
readonly
Returns the value of attribute currency.
-
#description ⇒ Object
readonly
Returns the value of attribute description.
-
#direction ⇒ Object
readonly
Returns the value of attribute direction.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#reference ⇒ Object
readonly
Returns the value of attribute reference.
-
#value_date ⇒ Object
readonly
Returns the value of attribute value_date.
Instance Method Summary collapse
- #api_response ⇒ Object
-
#initialize(object, response = nil) ⇒ PaymentAccountTransaction
constructor
Initialize a payment_account_transaction resource instance.
-
#links ⇒ Object
Return the links that the resource has.
-
#to_h ⇒ Object
Provides the payment_account_transaction resource as a hash of all its readable attributes.
Constructor Details
#initialize(object, response = nil) ⇒ PaymentAccountTransaction
Initialize a payment_account_transaction resource instance
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 30 def initialize(object, response = nil) @object = object @amount = object['amount'] @balance_after_transaction = object['balance_after_transaction'] @counterparty_name = object['counterparty_name'] @currency = object['currency'] @description = object['description'] @direction = object['direction'] @id = object['id'] @links = object['links'] @reference = object['reference'] @value_date = object['value_date'] @response = response end |
Instance Attribute Details
#amount ⇒ Object (readonly)
Returns the value of attribute amount.
18 19 20 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 18 def amount @amount end |
#balance_after_transaction ⇒ Object (readonly)
Returns the value of attribute balance_after_transaction.
19 20 21 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 19 def balance_after_transaction @balance_after_transaction end |
#counterparty_name ⇒ Object (readonly)
Returns the value of attribute counterparty_name.
20 21 22 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 20 def counterparty_name @counterparty_name end |
#currency ⇒ Object (readonly)
Returns the value of attribute currency.
21 22 23 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 21 def currency @currency end |
#description ⇒ Object (readonly)
Returns the value of attribute description.
22 23 24 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 22 def description @description end |
#direction ⇒ Object (readonly)
Returns the value of attribute direction.
23 24 25 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 23 def direction @direction end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
24 25 26 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 24 def id @id end |
#reference ⇒ Object (readonly)
Returns the value of attribute reference.
25 26 27 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 25 def reference @reference end |
#value_date ⇒ Object (readonly)
Returns the value of attribute value_date.
26 27 28 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 26 def value_date @value_date end |
Instance Method Details
#api_response ⇒ Object
46 47 48 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 46 def api_response ApiResponse.new(@response) end |
#links ⇒ Object
Return the links that the resource has
51 52 53 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 51 def links @payment_account_transaction_links ||= Links.new(@links) end |
#to_h ⇒ Object
Provides the payment_account_transaction resource as a hash of all its readable attributes
56 57 58 |
# File 'lib/gocardless_pro/resources/payment_account_transaction.rb', line 56 def to_h @object end |