Class: UserAccountsClient

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/clients/user_accounts_client.rb

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ UserAccountsClient

Initialize the UserAccountsClient class with an API client instance.

Parameters:

  • connection (LockstepApi)

    The API client object for this connection



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.

Parameters:

  • group_key (uuid)


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.

Parameters:

  • id (uuid)

    The unique Lockstep Platform ID number of this User



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.

Parameters:

  • include_param (string)

    The set of data to retrieve. To avoid any casing confusion, these values are converted to upper case. Possible values are: UTM



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.

Parameters:

  • body (InviteSubmitModel)

    The user to invite



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.

Parameters:



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.

Parameters:

  • code (uuid)

    The code of the invite



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.

Parameters:

  • id (uuid)

    The unique ID number of the User to retrieve

  • include_param (string)

    To fetch additional data on this object, specify the list of elements to retrieve. Available collections: Notes, Attachments, CustomFields, AccountingRole



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.

Parameters:

  • body (SupportAccessRequest)


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.

Parameters:

  • body (TransferOwnerSubmitModel)


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.

Parameters:

  • id (uuid)

    The unique ID number of the User to retrieve

  • body (object)

    A list of changes to apply to this User



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