Class: Revox::Resources::Users::Me

Inherits:
Object
  • Object
show all
Defined in:
lib/revox/resources/users/me.rb,
sig/revox/resources/users/me.rbs

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Me

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 Me.

Parameters:



49
50
51
# File 'lib/revox/resources/users/me.rb', line 49

def initialize(client:)
  @client = client
end

Instance Method Details

#retrieve(request_options: {}) ⇒ Revox::Models::Users::MeRetrieveResponse

Get the current authenticated user.

Parameters:

Returns:

See Also:



16
17
18
19
20
21
22
23
# File 'lib/revox/resources/users/me.rb', line 16

def retrieve(params = {})
  @client.request(
    method: :get,
    path: "users/me",
    model: Revox::Models::Users::MeRetrieveResponse,
    options: params[:request_options]
  )
end

#update(has_completed_onboarding: nil, request_options: {}) ⇒ Revox::Models::Users::MeUpdateResponse

Update the current authenticated user.

Parameters:

Returns:

See Also:



35
36
37
38
39
40
41
42
43
44
# File 'lib/revox/resources/users/me.rb', line 35

def update(params = {})
  parsed, options = Revox::Users::MeUpdateParams.dump_request(params)
  @client.request(
    method: :patch,
    path: "users/me",
    body: parsed,
    model: Revox::Models::Users::MeUpdateResponse,
    options: options
  )
end