Class: Revox::Resources::Users::Me
- Inherits:
-
Object
- Object
- Revox::Resources::Users::Me
- Defined in:
- lib/revox/resources/users/me.rb,
sig/revox/resources/users/me.rbs
Instance Method Summary collapse
-
#initialize(client:) ⇒ Me
constructor
private
A new instance of Me.
-
#retrieve(request_options: {}) ⇒ Revox::Models::Users::MeRetrieveResponse
Get the current authenticated user.
-
#update(has_completed_onboarding: nil, request_options: {}) ⇒ Revox::Models::Users::MeUpdateResponse
Update the current authenticated user.
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.
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.
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.
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/revox/resources/users/me.rb', line 35 def update(params = {}) parsed, = Revox::Users::MeUpdateParams.dump_request(params) @client.request( method: :patch, path: "users/me", body: parsed, model: Revox::Models::Users::MeUpdateResponse, options: ) end |