Class: Userplex::Resources::Users

Inherits:
Object
  • Object
show all
Defined in:
lib/userplex/resources/users.rb

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Users

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Users.

Parameters:



33
34
35
# File 'lib/userplex/resources/users.rb', line 33

def initialize(client:)
  @client = client
end

Instance Method Details

#identify(user_id:, attributes: nil, email: nil, name: nil, request_options: {}) ⇒ Userplex::Models::UserIdentifyResponse

Identify a user

Parameters:

  • user_id (String)
  • attributes (Hash{Symbol=>Object, nil})
  • email (String)
  • name (String)
  • request_options (Userplex::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



19
20
21
22
23
24
25
26
27
28
# File 'lib/userplex/resources/users.rb', line 19

def identify(params)
  parsed, options = Userplex::UserIdentifyParams.dump_request(params)
  @client.request(
    method: :post,
    path: "identify",
    body: parsed,
    model: Userplex::Models::UserIdentifyResponse,
    options: options
  )
end