Class: LockstepSdk::FinancialAccountSyncModel

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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_typeString



68
69
70
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 68

def cashflow_type
  @cashflow_type
end

#categoryString



80
81
82
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 80

def category
  @category
end

#classificationString



76
77
78
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 76

def classification
  @classification
end

#codeString



52
53
54
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 52

def code
  @code
end

#descriptionString



72
73
74
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 72

def description
  @description
end

#erp_keyString



56
57
58
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 56

def erp_key
  @erp_key
end

#nameString



60
61
62
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 60

def name
  @name
end

#on_match_actionMatchAction



48
49
50
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 48

def on_match_action
  @on_match_action
end

#statusString



64
65
66
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 64

def status
  @status
end

#subcategoryString



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



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(options={})
    {
        '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



105
106
107
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 105

def to_json(*options)
    "[#{as_json(*options).to_json(*options)}]"
end