Class: B2b

Inherits:
K2CommonEvents show all
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

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

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_tillObject (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_numberObject (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