Class: GroupAccountsClient

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

Instance Method Summary collapse

Constructor Details

#initialize(connection) ⇒ GroupAccountsClient

Initialize the GroupAccountsClient class with an API client instance.

Parameters:

  • connection (LockstepApi)

    The API client object for this connection



22
23
24
# File 'lib/lockstep_sdk/clients/group_accounts_client.rb', line 22

def initialize(connection)
    @connection = connection
end

Instance Method Details

#retrieve_group_account_dataObject

Retrieves group account data for the current user.



30
31
32
33
# File 'lib/lockstep_sdk/clients/group_accounts_client.rb', line 30

def ()
    path = "/api/v1/GroupAccounts/me"
    @connection.request(:get, path, nil, nil)
end

#update_group_account(id:, body:) ⇒ Object

Updates a group account 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.

Parameters:

  • id (uuid)

    The unique ID number of the Group Account to retrieve

  • body (object)

    A list of changes to apply to this Group Account



42
43
44
45
# File 'lib/lockstep_sdk/clients/group_accounts_client.rb', line 42

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