Class: K2ConnectRuby::K2Services::Payloads::K2Transaction
- Inherits:
-
Object
- Object
- K2ConnectRuby::K2Services::Payloads::K2Transaction
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#callback_url ⇒ Object
readonly
Returns the value of attribute callback_url.
-
#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.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(payload) ⇒ K2Transaction
constructor
A new instance of K2Transaction.
Constructor Details
#initialize(payload) ⇒ K2Transaction
Returns a new instance of K2Transaction.
13 14 15 16 17 18 19 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 13 def initialize(payload) @id = payload.dig("data", "id") @type = payload.dig("data", "type") @metadata = payload.dig("data", "attributes", "metadata") @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.
7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 7 def callback_url @callback_url end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 7 def id @id end |
#links_self ⇒ Object (readonly)
Returns the value of attribute links_self.
7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 7 def links_self @links_self end |
#metadata ⇒ Object (readonly)
Returns the value of attribute metadata.
7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 7 def @metadata end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_transaction.rb', line 7 def type @type end |