Sha256: 00b3cc0fcbf4b67de288ceef376d4a035a5c7468aa5c613fad472756bb409231

Contents?: true

Size: 523 Bytes

Versions: 5

Compression:

Stored size: 523 Bytes

Contents

class CustomerCreated < Webhook
  attr_reader :resource_first_name,
              :resource_middle_name,
              :resource_last_name,
              :resource_phone_number

  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
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
k2-connect-ruby-2.0.0 lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb
k2-connect-ruby-1.0.0 lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb
k2-connect-ruby-0.0.3 lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb
k2-connect-ruby-0.0.2 lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb
k2-connect-ruby-0.0.1 lib/k2-connect-ruby/k2_services/payloads/webhooks/customer_created.rb