Class: GroupAccountsClient
- Inherits:
-
Object
- Object
- GroupAccountsClient
- Defined in:
- lib/lockstep_sdk/clients/group_accounts_client.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ GroupAccountsClient
constructor
Initialize the GroupAccountsClient class with an API client instance.
-
#retrieve_group_account_data ⇒ Object
Retrieves group account data for the current user.
-
#update_group_account(id:, body:) ⇒ Object
Updates a group account that matches the specified id with the requested information.
Constructor Details
#initialize(connection) ⇒ GroupAccountsClient
Initialize the GroupAccountsClient class with an API client instance.
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_data ⇒ Object
Retrieves group account data for the current user.
30 31 32 33 |
# File 'lib/lockstep_sdk/clients/group_accounts_client.rb', line 30 def retrieve_group_account_data() 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.
42 43 44 45 |
# File 'lib/lockstep_sdk/clients/group_accounts_client.rb', line 42 def update_group_account(id:, body:) path = "/api/v1/GroupAccounts/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |