Class: UserAccountsClient

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

Instance Method Summary collapse

Constructor Details

#initialize(lockstepsdk) ⇒ UserAccountsClient

Initialize the UserAccountsClient class with a lockstepsdk instance.

Parameters:

  • lockstepsdk (LockstepApi)

    The Lockstep API client object for this connection



25
26
27
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 25

def initialize(lockstepsdk)
    @lockstepsdk = lockstepsdk
end

Instance Method Details

#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



63
64
65
66
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 63

def disable_user(id:)
    path = "/api/v1/UserAccounts/#{id}"
    @lockstepsdk.request(:delete, path, nil, nil)
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



86
87
88
89
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 86

def invite_user(body:)
    path = "/api/v1/UserAccounts/invite"
    @lockstepsdk.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:



122
123
124
125
126
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 122

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}
    @lockstepsdk.request(:get, path, nil, params)
end

#reenable_user(id:) ⇒ Object

Reenable 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



74
75
76
77
78
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 74

def reenable_user(id:)
    path = "/api/v1/UserAccounts/reenable"
    params = {:id => id}
    @lockstepsdk.request(:post, 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



97
98
99
100
101
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 97

def retrieve_invite_data(code:)
    path = "/api/v1/UserAccounts/invite"
    params = {:code => code}
    @lockstepsdk.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



37
38
39
40
41
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 37

def retrieve_user(id:, include_param:)
    path = "/api/v1/UserAccounts/#{id}"
    params = {:include => include_param}
    @lockstepsdk.request(:get, path, nil, params)
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)


109
110
111
112
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 109

def transfer_owner(body:)
    path = "/api/v1/UserAccounts/transfer-owner"
    @lockstepsdk.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



52
53
54
55
# File 'lib/lockstep_sdk/clients/user_accounts_client.rb', line 52

def update_user(id:, body:)
    path = "/api/v1/UserAccounts/#{id}"
    @lockstepsdk.request(:patch, path, body.to_camelback_keys.to_json, nil)
end