Class: LucidIntercom::UpdateUser

Inherits:
Object
  • Object
show all
Defined in:
lib/lucid_intercom/update_user.rb

Instance Method Summary collapse

Constructor Details

#initialize(post_request: Container[:post_request]) ⇒ UpdateUser

Returns a new instance of UpdateUser.

Parameters:

  • post_request (#call) (defaults to: Container[:post_request])


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

def initialize(post_request: Container[:post_request])
  @post_request = post_request
end

Instance Method Details

#call(user) ⇒ Object

Create or update user.

Parameters:

Raises:



22
23
24
# File 'lib/lucid_intercom/update_user.rb', line 22

def call(user)
  @post_request.('users', data(user)).assert!
end