Class: Buygoods

Inherits:
K2CommonEvents show all
Defined in:
lib/k2-connect-ruby/k2_services/payloads/k2_webhooks.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) ⇒ 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_nameObject (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_nameObject (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_numberObject (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

#systemObject (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_numberObject (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