Class: OutgoingTransaction
- Inherits:
-
CommonPayment
- Object
- K2Transaction
- CommonPayment
- OutgoingTransaction
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb
Direct Known Subclasses
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.
41 42 43 44 45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 41 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.
37 38 39 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 37 def created_at @created_at end |
#total_value ⇒ Object (readonly)
Returns the value of attribute total_value.
37 38 39 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 37 def total_value @total_value end |
#transfer_batches ⇒ Object (readonly)
Returns the value of attribute transfer_batches.
37 38 39 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 37 def transfer_batches @transfer_batches end |