Class: FinancialYearSettingsClient
- Inherits:
-
Object
- Object
- FinancialYearSettingsClient
- Defined in:
- lib/lockstep_sdk/clients/financial_year_settings_client.rb
Instance Method Summary collapse
-
#create_financial_year_setting(body:) ⇒ Object
Creates a financial year setting from a given model.
-
#delete_financial_year_setting(id:) ⇒ Object
Delete the Financial Year Setting referred to by this unique identifier.
-
#initialize(connection) ⇒ FinancialYearSettingsClient
constructor
Initialize the FinancialYearSettingsClient class with an API client instance.
-
#query_financial_year_settings(filter:, order:, page_size:, page_number:) ⇒ Object
Queries Financial Year Settings for this account using the specified filtering, sorting, and pagination rules requested.
-
#retrieve_financial_year_setting(id:) ⇒ Object
Retrieves the Financial Year Setting specified by this unique identifier.
-
#update_financial_year_setting(id:, body:) ⇒ Object
Updates a financial year setting that matches the specified id with the requested information.
Constructor Details
#initialize(connection) ⇒ FinancialYearSettingsClient
Initialize the FinancialYearSettingsClient class with an API client instance.
22 23 24 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 22 def initialize(connection) @connection = connection end |
Instance Method Details
#create_financial_year_setting(body:) ⇒ Object
Creates a financial year setting from a given model.
A Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
69 70 71 72 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 69 def create_financial_year_setting(body:) path = "/api/v1/FinancialYearSettings" @connection.request(:post, path, body, nil) end |
#delete_financial_year_setting(id:) ⇒ Object
Delete the Financial Year Setting referred to by this unique identifier.
A Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
58 59 60 61 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 58 def delete_financial_year_setting(id:) path = "/api/v1/FinancialYearSettings/#{id}" @connection.request(:delete, path, nil, nil) end |
#query_financial_year_settings(filter:, order:, page_size:, page_number:) ⇒ Object
Queries Financial Year Settings for this account using the specified filtering, sorting, and pagination rules requested.
More information on querying can be found on the [Searchlight Query Language](developer.lockstep.io/docs/querying-with-searchlight) page on the Lockstep Developer website.
A Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
85 86 87 88 89 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 85 def query_financial_year_settings(filter:, order:, page_size:, page_number:) path = "/api/v1/FinancialYearSettings/query" params = {:filter => filter, :order => order, :pageSize => page_size, :pageNumber => page_number} @connection.request(:get, path, nil, params) end |
#retrieve_financial_year_setting(id:) ⇒ Object
Retrieves the Financial Year Setting specified by this unique identifier.
A Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
33 34 35 36 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 33 def retrieve_financial_year_setting(id:) path = "/api/v1/FinancialYearSettings/#{id}" @connection.request(:get, path, nil, nil) end |
#update_financial_year_setting(id:, body:) ⇒ Object
Updates a financial year setting 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 Financial Year Setting is used to to set the type, beginning, end, and number of periods of a year used to calculate accounting reports. The financial setting can either be for a specific app enrollment id via a sync or, when the financial year setting is manually created, will cover all account data without an app enrollment id.
47 48 49 50 |
# File 'lib/lockstep_sdk/clients/financial_year_settings_client.rb', line 47 def update_financial_year_setting(id:, body:) path = "/api/v1/FinancialYearSettings/#{id}" @connection.request(:patch, path, body.to_camelback_keys.to_json, nil) end |