Class: K2ConnectRuby::K2Services::Payloads::Webhooks::B2bTransactionReceived

Inherits:
K2CommonEvents show all
Defined in:
lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_transaction_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 K2Webhooks

#created_at, #event_resource, #event_type, #id, #links_resource, #links_self, #resource_id, #topic

Instance Method Summary collapse

Constructor Details

#initialize(payload) ⇒ B2bTransactionReceived

Returns a new instance of B2bTransactionReceived.



9
10
11
12
13
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_transaction_received.rb', line 9

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.



6
7
8
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_transaction_received.rb', line 6

def sending_till
  @sending_till
end

#till_numberObject (readonly)

Returns the value of attribute till_number.



6
7
8
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/b2b_transaction_received.rb', line 6

def till_number
  @till_number
end