Class: K2ConnectRuby::K2Services::Payloads::OutgoingTransaction
- Inherits:
-
CommonPayment
- Object
- K2Transaction
- CommonPayment
- K2ConnectRuby::K2Services::Payloads::OutgoingTransaction
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb
Direct Known Subclasses
Transactions::OutgoingPayment, Transactions::SendMoneyPayment, Transactions::Transfer
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#total_value ⇒ Object
readonly
Returns the value of attribute total_value.
-
#transfer_batches ⇒ Object
readonly
Returns the value of attribute transfer_batches.
Attributes inherited from CommonPayment
Attributes inherited from K2Transaction
#callback_url, #id, #links_self, #metadata, #type
Instance Method Summary collapse
-
#initialize(payload) ⇒ OutgoingTransaction
constructor
A new instance of OutgoingTransaction.
Constructor Details
#initialize(payload) ⇒ OutgoingTransaction
Returns a new instance of OutgoingTransaction.
46 47 48 49 50 51 52 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 46 def initialize(payload) super @created_at = payload.dig("data", "attributes", "created_at") @currency = payload.dig("data", "attributes", "amount", "currency") @total_value = payload.dig("data", "attributes", "amount", "value") @transfer_batches = payload.dig("data", "attributes", "transfer_batches") end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
42 43 44 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 42 def created_at @created_at end |
#total_value ⇒ Object (readonly)
Returns the value of attribute total_value.
42 43 44 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 42 def total_value @total_value end |
#transfer_batches ⇒ Object (readonly)
Returns the value of attribute transfer_batches.
42 43 44 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 42 def transfer_batches @transfer_batches end |