Class: LockstepSdk::FinancialAccountBalanceHistorySyncModel

Inherits:
Object
  • Object
show all
Defined in:
lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb

Overview

The FinancialAccountBalanceHistorySyncModel 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 FinancialAccountBalanceHistorySyncModel 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.

If the FinancialAccountBalanceHistorySyncModels are imported via a connector instead, please ensure that all records are passed in on every sync. Records that are not passed in will be assumed to be deleted.

Once imported, this record will be available in the Lockstep API as a [FinancialAccountBalanceHistoryModel](developer.lockstep.io/docs/financialaccountbalancehistorymodel).

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 = {}) ⇒ FinancialAccountBalanceHistorySyncModel

Initialize the FinancialAccountBalanceHistorySyncModel using the provided prototype



36
37
38
39
40
41
42
43
44
45
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 36

def initialize(params = {})
    @financial_account_code = params.dig(:financial_account_code)
    @financial_account_erp_key = params.dig(:financial_account_erp_key)
    @financial_year = params.dig(:financial_year)
    @period_number = params.dig(:period_number)
    @period_start_date = params.dig(:period_start_date)
    @period_end_date = params.dig(:period_end_date)
    @status = params.dig(:status)
    @balance = params.dig(:balance)
end

Instance Attribute Details

#balanceDouble

Returns The current or end balance of this period.

Returns:

  • (Double)

    The current or end balance of this period.



77
78
79
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 77

def balance
  @balance
end

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



49
50
51
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 49

def 
  @financial_account_code
end

#financial_account_erp_keyString

Returns This is the primary key of the FinancialAccount record. For this field, you should use whatever the company’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your company records in a database, whatever the primary key for the company table is in the database should be the ErpKey. Example: If you use a financial system such as Quickbooks or Xero, look for the primary ID number of the company record within that financial system.

Returns:

  • (String)

    This is the primary key of the FinancialAccount record. For this field, you should use whatever the company’s unique identifying number is in the originating system. Search for a unique, non-changing number within the originating financial system for this record. Example: If you store your company records in a database, whatever the primary key for the company table is in the database should be the ErpKey. Example: If you use a financial system such as Quickbooks or Xero, look for the primary ID number of the company record within that financial system.



53
54
55
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 53

def 
  @financial_account_erp_key
end

#financial_yearInt32

Returns The financial year that this period falls under.

Returns:

  • (Int32)

    The financial year that this period falls under



57
58
59
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 57

def financial_year
  @financial_year
end

#period_end_dateDate-time

Returns The end date of this period.

Returns:

  • (Date-time)

    The end date of this period.



69
70
71
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 69

def period_end_date
  @period_end_date
end

#period_numberInt32

Returns The period number (1-12 or 1-13) that this balance history is for.

Returns:

  • (Int32)

    The period number (1-12 or 1-13) that this balance history is for



61
62
63
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 61

def period_number
  @period_number
end

#period_start_dateDate-time

Returns The start date of this period.

Returns:

  • (Date-time)

    The start date of this period.



65
66
67
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 65

def period_start_date
  @period_start_date
end

#statusString

Returns The status of this period. The status should be Closed if the books for this period have been closed, if not the status should be Open. The status can also be Deleted if there was a recalculation that needed to occur, for example due to a change in financial year settings.

Returns:

  • (String)

    The status of this period. The status should be Closed if the books for this period have been closed, if not the status should be Open. The status can also be Deleted if there was a recalculation that needed to occur, for example due to a change in financial year settings.



73
74
75
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 73

def status
  @status
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



81
82
83
84
85
86
87
88
89
90
91
92
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 81

def as_json(options={})
    {
        'financialAccountCode' => @financial_account_code,
        'financialAccountErpKey' => @financial_account_erp_key,
        'financialYear' => @financial_year,
        'periodNumber' => @period_number,
        'periodStartDate' => @period_start_date,
        'periodEndDate' => @period_end_date,
        'status' => @status,
        'balance' => @balance,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



96
97
98
# File 'lib/lockstep_sdk/models/financial_account_balance_history_sync_model.rb', line 96

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