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
# 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_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.



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

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



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

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.



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

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.



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

def code
  @code
end

#descriptionString

Returns The description for the Financial Account.

Returns:

  • (String)

    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_keyString

Returns The External Id for the Financial Account.

Returns:

  • (String)

    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

#nameString

Returns The name of the Financial Account.

Returns:

  • (String)

    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

#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.



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

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.



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.

Returns:

  • (object)

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



99
100
101
# File 'lib/lockstep_sdk/models/financial_account_sync_model.rb', line 99

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