Class: LockstepSdk::FinancialAccountBalanceHistorySyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::FinancialAccountBalanceHistorySyncModel
- Defined in:
- lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb
Overview
The FinancialAccountBalanceHistorySyncModel represents information coming into Lockstep from an external financial system or other enterprise resource planning system. To import data from an external system, convert your original data into the FinancialAccountBalanceHistorySyncModel format and call the [Upload Sync File API](developer.lockstep.io/reference/post_api-v1-sync-zip). This API retrieves all of the data you uploaded in a compressed ZIP file and imports it into the Lockstep platform.
If the FinancialAccountBalanceHistorySyncModels are imported via a connector instead, please ensure that all records are passed in on every sync. Records that are not passed in will be assumed to be deleted.
Once imported, this record will be available in the Lockstep API as a [FinancialAccountBalanceHistoryModel](developer.lockstep.io/docs/financialaccountbalancehistorymodel).
For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).
Instance Attribute Summary collapse
-
#balance ⇒ Double
The current or end balance of this period.
-
#balance_type ⇒ FinancialAccountBalanceType
The balance type of this period.
-
#financial_account_code ⇒ String
The code for the Financial Account.
-
#financial_account_erp_key ⇒ String
This is the primary key of the FinancialAccount record.
-
#financial_year ⇒ Int32
The financial year that this period falls under.
-
#period_end_date ⇒ Date-time
The end date of this period.
-
#period_number ⇒ Int32
The period number (1-12 or 1-13) that this balance history is for.
-
#period_start_date ⇒ Date-time
The start date of this period.
-
#status ⇒ String
The status of this period.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ FinancialAccountBalanceHistorySyncModel
constructor
Initialize the FinancialAccountBalanceHistorySyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ FinancialAccountBalanceHistorySyncModel
Initialize the FinancialAccountBalanceHistorySyncModel using the provided prototype
36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 36 def initialize(params = {}) @financial_account_code = params.dig(:financial_account_code) @financial_account_erp_key = params.dig(:financial_account_erp_key) @financial_year = params.dig(:financial_year) @period_number = params.dig(:period_number) @period_start_date = params.dig(:period_start_date) @period_end_date = params.dig(:period_end_date) @status = params.dig(:status) @balance = params.dig(:balance) @balance_type = params.dig(:balance_type) end |
Instance Attribute Details
#balance ⇒ Double
Returns The current or end balance of this period.
78 79 80 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 78 def balance @balance end |
#balance_type ⇒ FinancialAccountBalanceType
Returns The balance type of this period. If left null, the balance type will be determined by the balance.
82 83 84 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 82 def balance_type @balance_type end |
#financial_account_code ⇒ String
Returns The code for the Financial Account. Can either be a general ledger or an account code.
50 51 52 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 50 def financial_account_code @financial_account_code end |
#financial_account_erp_key ⇒ String
Returns This is the primary key of the FinancialAccount record. For this field, you should use whatever the company’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your company records in a database, whatever the primary key for the company table is in the database should be the ErpKey. Example: If you use a financial system such as Quickbooks or Xero, look for the primary ID number of the company record within that financial system.
54 55 56 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 54 def financial_account_erp_key @financial_account_erp_key end |
#financial_year ⇒ Int32
Returns The financial year that this period falls under.
58 59 60 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 58 def financial_year @financial_year end |
#period_end_date ⇒ Date-time
Returns The end date of this period.
70 71 72 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 70 def period_end_date @period_end_date end |
#period_number ⇒ Int32
Returns The period number (1-12 or 1-13) that this balance history is for.
62 63 64 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 62 def period_number @period_number end |
#period_start_date ⇒ Date-time
Returns The start date of this period.
66 67 68 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 66 def period_start_date @period_start_date end |
#status ⇒ String
Returns The status of this period. The status should be Closed if the books for this period have been closed, if not the status should be Open. The status can also be Deleted if there was a recalculation that needed to occur, for example due to a change in financial year settings.
74 75 76 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 74 def status @status end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 86 def as_json(={}) { 'financialAccountCode' => @financial_account_code, 'financialAccountErpKey' => @financial_account_erp_key, 'financialYear' => @financial_year, 'periodNumber' => @period_number, 'periodStartDate' => @period_start_date, 'periodEndDate' => @period_end_date, 'status' => @status, 'balance' => @balance, 'balanceType' => @balance_type, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
102 103 104 |
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 102 def to_json(*) "[#{as_json(*).to_json(*)}]" end |