Class: B2b
- Inherits:
-
K2CommonEvents
- Object
- Webhook
- K2CommonEvents
- B2b
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_received.rb
Constant Summary
Constants inherited from K2CommonEvents
K2CommonEvents::REFERENCE_EXCEPTIONS
Instance Attribute Summary collapse
-
#sending_till ⇒ Object
readonly
Returns the value of attribute sending_till.
-
#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) ⇒ B2b
constructor
A new instance of B2b.
Constructor Details
#initialize(payload) ⇒ B2b
Returns a new instance of B2b.
5 6 7 8 9 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_received.rb', line 5 def initialize(payload) super @till_number = payload.dig('event', 'resource', 'till_number') @sending_till = payload.dig('event', 'resource', 'sending_till') end |
Instance Attribute Details
#sending_till ⇒ Object (readonly)
Returns the value of attribute sending_till.
2 3 4 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_received.rb', line 2 def sending_till @sending_till end |
#till_number ⇒ Object (readonly)
Returns the value of attribute till_number.
2 3 4 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_received.rb', line 2 def till_number @till_number end |