Class: LockstepSdk::FinancialAccountSyncModel
- Inherits:
-
Object
- Object
- LockstepSdk::FinancialAccountSyncModel
- Defined in:
- lib/lockstep_sdk/models/financial_account_sync_model.rb
Overview
The FinancialAccountSyncModel 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 FinancialAccountSyncModel 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.
Once imported, this record will be available in the Lockstep API as a [FinancialAccountModel](developer.lockstep.io/docs/financialaccountmodel).
For more information on writing your own connector, see [Connector Data](developer.lockstep.io/docs/connector-data).
Instance Attribute Summary collapse
-
#cashflow_type ⇒ String
The cashflow type for the Financial Account.
-
#category ⇒ String
The category for the Financial Account.
-
#classification ⇒ String
The classification for the Financial Account.
-
#code ⇒ String
The code for the Financial Account.
-
#description ⇒ String
The description for the Financial Account.
-
#erp_key ⇒ String
The External Id for the Financial Account.
-
#name ⇒ String
The name of the Financial Account.
-
#status ⇒ String
The status of the Financial Account.
-
#subcategory ⇒ String
The subcategory for the Financial Account.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ FinancialAccountSyncModel
constructor
Initialize the FinancialAccountSyncModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
Constructor Details
#initialize(params = {}) ⇒ FinancialAccountSyncModel
Initialize the FinancialAccountSyncModel using the provided prototype
33 34 35 36 37 38 39 40 41 42 43 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 33 def initialize(params = {}) @code = params.dig(:code) @erp_key = params.dig(:erp_key) @name = params.dig(:name) @status = params.dig(:status) @cashflow_type = params.dig(:cashflow_type) @description = params.dig(:description) @classification = params.dig(:classification) @category = params.dig(:category) @subcategory = params.dig(:subcategory) end |
Instance Attribute Details
#cashflow_type ⇒ String
Returns The cashflow type for the Financial Account. Examples include cash, financing, investment or operation.
63 64 65 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 63 def cashflow_type @cashflow_type end |
#category ⇒ String
Returns The category for the Financial Account. Examples include Current Asset, Current Liability, Common Stock.
75 76 77 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 75 def category @category end |
#classification ⇒ String
Returns The classification for the Financial Account. Possible values are Asset, Equity, Expense, Liability or Income.
71 72 73 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 71 def classification @classification end |
#code ⇒ String
Returns The code for the Financial Account. Can either be a general ledger or an account code.
47 48 49 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 47 def code @code end |
#description ⇒ String
Returns The description for the Financial Account.
67 68 69 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 67 def description @description end |
#erp_key ⇒ String
Returns The External Id for the Financial Account.
51 52 53 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 51 def erp_key @erp_key end |
#name ⇒ String
Returns The name of the Financial Account.
55 56 57 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 55 def name @name end |
#status ⇒ String
Returns The status of the Financial Account. Possible values are active, inactive, deleted or archived.
59 60 61 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 59 def status @status end |
#subcategory ⇒ String
Returns The subcategory for the Financial Account. Examples include Cash, Property, Bank Loan, etc.
79 80 81 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 79 def subcategory @subcategory end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
83 84 85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 83 def as_json(={}) { 'code' => @code, 'erpKey' => @erp_key, 'name' => @name, 'status' => @status, 'cashflowType' => @cashflow_type, 'description' => @description, 'classification' => @classification, 'category' => @category, 'subcategory' => @subcategory, } end |
#to_json(*options) ⇒ String
Returns This object converted to a JSON string.
99 100 101 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 99 def to_json(*) "[#{as_json(*).to_json(*)}]" end |