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.
-
#on_match_action ⇒ MatchAction
Indicates what action to take when an existing object has been found during the sync process.
-
#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 44 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 33 def initialize(params = {}) @on_match_action = params.dig(:on_match_action) @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.
68 69 70 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 68 def cashflow_type @cashflow_type end |
#category ⇒ String
Returns The category for the Financial Account. Examples include Current Asset, Current Liability, Common Stock.
80 81 82 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 80 def category @category end |
#classification ⇒ String
Returns The classification for the Financial Account. Possible values are Asset, Equity, Expense, Liability or Income.
76 77 78 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 76 def classification @classification end |
#code ⇒ String
Returns The code for the Financial Account. Can either be a general ledger or an account code.
52 53 54 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 52 def code @code end |
#description ⇒ String
Returns The description for the Financial Account.
72 73 74 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 72 def description @description end |
#erp_key ⇒ String
Returns The External Id for the Financial Account.
56 57 58 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 56 def erp_key @erp_key end |
#name ⇒ String
Returns The name of the Financial Account.
60 61 62 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 60 def name @name end |
#on_match_action ⇒ MatchAction
Returns Indicates what action to take when an existing object has been found during the sync process.
48 49 50 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 48 def on_match_action @on_match_action end |
#status ⇒ String
Returns The status of the Financial Account. Possible values are active, inactive, deleted or archived.
64 65 66 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 64 def status @status end |
#subcategory ⇒ String
Returns The subcategory for the Financial Account. Examples include Cash, Property, Bank Loan, etc.
84 85 86 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 84 def subcategory @subcategory end |
Instance Method Details
#as_json(options = {}) ⇒ object
Returns This object as a JSON key-value structure.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 88 def as_json(={}) { 'onMatchAction' => @on_match_action, '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.
105 106 107 |
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 105 def to_json(*) "[#{as_json(*).to_json(*)}]" end |