Class: Buygoods
- Inherits:
-
K2CommonEvents
- Object
- Webhook
- K2CommonEvents
- Buygoods
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb
Direct Known Subclasses
Constant Summary
Constants inherited from K2CommonEvents
K2CommonEvents::REFERENCE_EXCEPTIONS
Instance Attribute Summary collapse
-
#sender_first_name ⇒ Object
readonly
Returns the value of attribute sender_first_name.
-
#sender_last_name ⇒ Object
readonly
Returns the value of attribute sender_last_name.
-
#sender_phone_number ⇒ Object
readonly
Returns the value of attribute sender_phone_number.
-
#system ⇒ Object
readonly
Returns the value of attribute system.
-
#till_number ⇒ Object
readonly
Returns the value of attribute till_number.
Attributes inherited from K2CommonEvents
#amount, #currency, #origination_time, #reference, #status
Attributes inherited from Webhook
#created_at, #event_resource, #event_type, #id, #links_resource, #links_self, #resource_id, #topic
Instance Method Summary collapse
-
#initialize(payload) ⇒ Buygoods
constructor
A new instance of Buygoods.
Constructor Details
#initialize(payload) ⇒ Buygoods
Returns a new instance of Buygoods.
51 52 53 54 55 56 57 58 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 51 def initialize(payload) super @system = payload.dig('event', 'resource', 'system') @till_number = payload.dig('event', 'resource', 'till_number') @sender_phone_number = payload.dig('event', 'resource', 'sender_phone_number') @sender_first_name = payload.dig('event', 'resource', 'sender_first_name') @sender_last_name = payload.dig('event', 'resource', 'sender_last_name') end |
Instance Attribute Details
#sender_first_name ⇒ Object (readonly)
Returns the value of attribute sender_first_name.
45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 45 def sender_first_name @sender_first_name end |
#sender_last_name ⇒ Object (readonly)
Returns the value of attribute sender_last_name.
45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 45 def sender_last_name @sender_last_name end |
#sender_phone_number ⇒ Object (readonly)
Returns the value of attribute sender_phone_number.
45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 45 def sender_phone_number @sender_phone_number end |
#system ⇒ Object (readonly)
Returns the value of attribute system.
45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 45 def system @system end |
#till_number ⇒ Object (readonly)
Returns the value of attribute till_number.
45 46 47 |
# File 'lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.rb', line 45 def till_number @till_number end |