Class: UserAccountsClient
- Inherits:
-
Object
- Object
- UserAccountsClient
- Defined in:
- lib/lockstep_sdk/clients/user_accounts_client.rb
Instance Method Summary collapse
-
#change_user_group(group_key:) ⇒ Object
Change the active GroupKey of the calling user.
-
#disable_user(id:) ⇒ Object
Disable the user referred to by this unique identifier.
-
#get_user_data(include_param:) ⇒ Object
Retrieves the user data for the current user.
-
#initialize(connection) ⇒ UserAccountsClient
constructor
Initialize the UserAccountsClient class with an API client instance.
-
#invite_user(body:) ⇒ Object
Invite a user with the specified email to join your accounting group.
-
#query_users(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Users for this account using the specified filtering, sorting, nested fetch, and pagination rules requested.
-
#retrieve_invite_data(code:) ⇒ Object
Retrieves invite information for the specified invite token.
-
#retrieve_user(id:, include_param:) ⇒ Object
Retrieves the User with this identifier.
-
#set_support_access(body:) ⇒ Object
Set support access for the calling user.
-
#transfer_owner(body:) ⇒ Object
Transfer the ownership of a group to another user.
-
#update_user(id:, body:) ⇒ Object
Updates a User that matches the specified id with the requested information.
Constructor Details
#initialize(connection) ⇒ UserAccountsClient
Initialize the UserAccountsClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#change_user_group(group_key:) ⇒ Object
Change the active GroupKey of the calling user.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
119 120 121 122 123 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 119 def change_user_group(group_key:) path = "/api/v1/UserAccounts/change-group" params = {:groupKey => group_key} @connection.request(:post, path, nil, params) end |
#disable_user(id:) ⇒ Object
Disable the user referred to by this unique identifier.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
60 61 62 63 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 60 def disable_user(id:) path = "/api/v1/UserAccounts/#{id}" @connection.request(:delete, path, nil, nil) end |
#get_user_data(include_param:) ⇒ Object
Retrieves the user data for the current user. This allows for retrieving extended user data such as UTM parameters.
129 130 131 132 133 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 129 def get_user_data(include_param:) path = "/api/v1/UserAccounts/user-data" params = {:include => include_param} @connection.request(:get, path, nil, params) end |
#invite_user(body:) ⇒ Object
Invite a user with the specified email to join your accounting group. The user will receive an email to set up their account.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
71 72 73 74 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 71 def invite_user(body:) path = "/api/v1/UserAccounts/invite" @connection.request(:post, path, body, nil) end |
#query_users(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
Queries Users for this account using the specified filtering, sorting, nested fetch, and pagination rules requested. A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
107 108 109 110 111 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 107 def query_users(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/UserAccounts/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_invite_data(code:) ⇒ Object
Retrieves invite information for the specified invite token.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
82 83 84 85 86 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 82 def retrieve_invite_data(code:) path = "/api/v1/UserAccounts/invite" params = {:code => code} @connection.request(:get, path, nil, params) end |
#retrieve_user(id:, include_param:) ⇒ Object
Retrieves the User with this identifier.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
34 35 36 37 38 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 34 def retrieve_user(id:, include_param:) path = "/api/v1/UserAccounts/#{id}" params = {:include => include_param} @connection.request(:get, path, nil, params) end |
#set_support_access(body:) ⇒ Object
Set support access for the calling user.
Support access allows Lockstep to access the user’s account to troubleshoot issues. Access is granted for a limited time, can be revoked at any time, and requires a code to verify the access.
Every call to this API will regenerate the support access code.
143 144 145 146 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 143 def set_support_access(body:) path = "/api/v1/UserAccounts/support-access" @connection.request(:post, path, body, nil) end |
#transfer_owner(body:) ⇒ Object
Transfer the ownership of a group to another user. This API must be called by the current owner of the group.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
94 95 96 97 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 94 def transfer_owner(body:) path = "/api/v1/UserAccounts/transfer-owner" @connection.request(:post, path, body, nil) end |
#update_user(id:, body:) ⇒ Object
Updates a User that matches the specified id with the requested information.
The PATCH method allows you to change specific values on the object while leaving other values alone. As input you should supply a list of field names and new values. If you do not provide the name of a field, that field will remain unchanged. This allows you to ensure that you are only updating the specific fields desired.
A User represents a person who has the ability to authenticate against the Lockstep Platform and use services such as Lockstep Inbox. A User is uniquely identified by an Azure identity, and each user must have an email address defined within their account. All Users must validate their email to make use of Lockstep platform services. Users may have different privileges and access control rights within the Lockstep Platform.
49 50 51 52 |
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 49 def update_user(id:, body:) path = "/api/v1/UserAccounts/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |