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

Returns The cashflow type for the Financial Account. Examples include cash, financing, investment or operation.

Returns:

  • (String)

    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

#categoryString

Returns The category for the Financial Account. Examples include Current Asset, Current Liability, Common Stock.

Returns:

  • (String)

    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

#classificationString

Returns The classification for the Financial Account. Possible values are Asset, Equity, Expense, Liability or Income.

Returns:

  • (String)

    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

#codeString

Returns The code for the Financial Account. Can either be a general ledger or an account code.

Returns:

  • (String)

    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

#descriptionString

Returns The description for the Financial Account.

Returns:

  • (String)

    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_keyString

Returns The External Id for the Financial Account.

Returns:

  • (String)

    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

#nameString

Returns The name of the Financial Account.

Returns:

  • (String)

    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_actionMatchAction

Returns Indicates what action to take when an existing object has been found during the sync process.

Returns:

  • (MatchAction)

    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

#statusString

Returns The status of the Financial Account. Possible values are active, inactive, deleted or archived.

Returns:

  • (String)

    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

#subcategoryString

Returns The subcategory for the Financial Account. Examples include Cash, Property, Bank Loan, etc.

Returns:

  • (String)

    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.

Returns:

  • (object)

    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(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

Returns This object converted to a JSON string.

Returns:

  • (String)

    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(*options)
    "[#{as_json(*options).to_json(*options)}]"
end