Class: K2ConnectRuby::K2Services::Payloads::Webhooks::CustomerCreated
- Inherits:
-
K2Webhooks
- Object
- K2Webhooks
- K2ConnectRuby::K2Services::Payloads::Webhooks::CustomerCreated
- Defined in:
- lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb
Instance Attribute Summary collapse
-
#resource_first_name ⇒ Object
readonly
Returns the value of attribute resource_first_name.
-
#resource_last_name ⇒ Object
readonly
Returns the value of attribute resource_last_name.
-
#resource_middle_name ⇒ Object
readonly
Returns the value of attribute resource_middle_name.
-
#resource_phone_number ⇒ Object
readonly
Returns the value of attribute resource_phone_number.
Attributes inherited from K2Webhooks
#created_at, #event_resource, #event_type, #id, #links_resource, #links_self, #resource_id, #topic
Instance Method Summary collapse
-
#initialize(payload) ⇒ CustomerCreated
constructor
A new instance of CustomerCreated.
Constructor Details
#initialize(payload) ⇒ CustomerCreated
Returns a new instance of CustomerCreated.
11 12 13 14 15 16 17 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb', line 11 def initialize(payload) super @resource_first_name = payload.dig('event', 'resource', 'first_name') @resource_middle_name = payload.dig('event', 'resource', 'middle_name') @resource_last_name = payload.dig('event', 'resource', 'last_name') @resource_phone_number = payload.dig('event', 'resource', 'phone_number') end |
Instance Attribute Details
#resource_first_name ⇒ Object (readonly)
Returns the value of attribute resource_first_name.
6 7 8 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb', line 6 def resource_first_name @resource_first_name end |
#resource_last_name ⇒ Object (readonly)
Returns the value of attribute resource_last_name.
6 7 8 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb', line 6 def resource_last_name @resource_last_name end |
#resource_middle_name ⇒ Object (readonly)
Returns the value of attribute resource_middle_name.
6 7 8 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb', line 6 def resource_middle_name @resource_middle_name end |
#resource_phone_number ⇒ Object (readonly)
Returns the value of attribute resource_phone_number.
6 7 8 |
# File 'lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb', line 6 def resource_phone_number @resource_phone_number end |