Class: LucidIntercom::UpdateUser

Inherits:
Object
  • Object
show all
Extended by:
Dry::Initializer
Defined in:
lib/lucid_intercom/update_user.rb

Instance Method Summary collapse

Instance Method Details

#call(event) ⇒ Object

Create or update user identified by event attributes. This is only used in the context of events.

Parameters:

  • event (Events::Event)

Raises:



23
24
25
26
27
# File 'lib/lucid_intercom/update_user.rb', line 23

def call(event)
  data = data(event)

  post_request.('users', data).assert!
end

#post_requestPostRequest

Returns:



12
# File 'lib/lucid_intercom/update_user.rb', line 12

option :post_request, default: proc { PostRequest.new }