Class: K2ConnectRuby::K2Services::Payloads::Transactions::Reversal
- Inherits:
-
Object
- Object
- K2ConnectRuby::K2Services::Payloads::Transactions::Reversal
- Includes:
- ActiveModel::Validations
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb
Overview
Parsed attributes of reversal result callback
Instance Attribute Summary collapse
-
#callback_url ⇒ Object
readonly
Returns the value of attribute callback_url.
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
-
#links_self ⇒ Object
readonly
Returns the value of attribute links_self.
-
#metadata ⇒ Object
readonly
Returns the value of attribute metadata.
-
#reason ⇒ Object
readonly
Returns the value of attribute reason.
-
#request_errors ⇒ Object
readonly
Returns the value of attribute request_errors.
-
#reversal_bulk_payment ⇒ Object
readonly
Returns the value of attribute reversal_bulk_payment.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#transaction_reference ⇒ Object
readonly
Returns the value of attribute transaction_reference.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(payload) ⇒ Reversal
constructor
A new instance of Reversal.
Constructor Details
#initialize(payload) ⇒ Reversal
Returns a new instance of Reversal.
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 18 def initialize(payload) @id = payload.dig("data", "id") @type = payload.dig("data", "type") @transaction_reference = payload.dig("data", "attributes", "transaction_reference") @status = payload.dig("data", "attributes", "status") @created_at = payload.dig("data", "attributes", "created_at") @reason = payload.dig("data", "attributes", "reason") @reversal_bulk_payment = payload.dig("data", "attributes", "reversal_bulk_payment")&.deep_symbolize_keys @metadata = payload.dig("data", "attributes", "metadata")&.deep_symbolize_keys @request_errors = payload.dig("data", "attributes", "errors") @links_self = payload.dig("data", "attributes", "_links", "self") @callback_url = payload.dig("data", "attributes", "_links", "callback_url") end |
Instance Attribute Details
#callback_url ⇒ Object (readonly)
Returns the value of attribute callback_url.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def callback_url @callback_url end |
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def created_at @created_at end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def id @id end |
#links_self ⇒ Object (readonly)
Returns the value of attribute links_self.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def links_self @links_self end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def @metadata end |
#reason ⇒ Object (readonly)
Returns the value of attribute reason.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def reason @reason end |
#request_errors ⇒ Object (readonly)
Returns the value of attribute request_errors.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def request_errors @request_errors end |
#reversal_bulk_payment ⇒ Object (readonly)
Returns the value of attribute reversal_bulk_payment.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def reversal_bulk_payment @reversal_bulk_payment end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def status @status end |
#transaction_reference ⇒ Object (readonly)
Returns the value of attribute transaction_reference.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def transaction_reference @transaction_reference end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
11 12 13 |
# File 'lib/k2-connect-ruby/k2_services/payloads/transactions/reversal.rb', line 11 def type @type end |