Class: FinancialAccountClient
- Inherits:
-
Object
- Object
- FinancialAccountClient
- Defined in:
- lib/lockstep_sdk/clients/financial_account_client.rb
Instance Method Summary collapse
-
#create_financial_account(body:) ⇒ Object
Creates a financial account with the specified name.
-
#delete_financial_account(id:) ⇒ Object
Deletes the Financial Account referred to by this unique identifier.
-
#initialize(connection) ⇒ FinancialAccountClient
constructor
Initialize the FinancialAccountClient class with an API client instance.
- #query_financial_accounts(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
-
#retrieve_financial_account(id:) ⇒ Object
Retrieves the financial account specified by this unique identifier.
- #update_financial_account(id:, body:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ FinancialAccountClient
Initialize the FinancialAccountClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#create_financial_account(body:) ⇒ Object
Creates a financial account with the specified name.
31 32 33 34 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 31 def create_financial_account(body:) path = "/api/v1/FinancialAccount" @connection.request(:post, path, body, nil) end |
#delete_financial_account(id:) ⇒ Object
Deletes the Financial Account referred to by this unique identifier.
59 60 61 62 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 59 def delete_financial_account(id:) path = "/api/v1/FinancialAccount/#{id}" @connection.request(:delete, path, nil, nil) end |
#query_financial_accounts(filter:, include_param:, order:, page_size:, page_number:) ⇒ Object
72 73 74 75 76 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 72 def query_financial_accounts(filter:, include_param:, order:, page_size:, page_number:) path = "/api/v1/FinancialAccount/query" params = {:filter => filter, :include => include_param, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_financial_account(id:) ⇒ Object
Retrieves the financial account specified by this unique identifier.
40 41 42 43 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 40 def retrieve_financial_account(id:) path = "/api/v1/FinancialAccount/#{id}" @connection.request(:get, path, nil, nil) end |
#update_financial_account(id:, body:) ⇒ Object
50 51 52 53 |
# File 'lib/lockstep_sdk/clients/financial_account_client.rb', line 50 def update_financial_account(id:, body:) path = "/api/v1/FinancialAccount/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |