Class: LockstepSdk::FinancialAccountBalanceHistoryModel

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

Overview

Represents a balance for a financial account for a given period of time.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ FinancialAccountBalanceHistoryModel

Initialize the FinancialAccountBalanceHistoryModel using the provided prototype



27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 27

def initialize(params = {})
    @financial_account_balance_history_id = params.dig(:financial_account_balance_history_id)
    @group_key = params.dig(:group_key)
    @financial_account_id = params.dig(:financial_account_id)
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @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)
    @created = params.dig(:created)
    @created_user_id = params.dig(:created_user_id)
    @modified = params.dig(:modified)
    @modified_user_id = params.dig(:modified_user_id)
end

Instance Attribute Details

#app_enrollment_idUuid

Returns The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.

Returns:

  • (Uuid)

    The AppEnrollmentId of the application that imported this record. For accounts with more than one financial system connected, this field identifies the originating financial system that produced this record. This value is null if this record was not loaded from an external ERP or financial system.



58
59
60
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 58

def app_enrollment_id
  @app_enrollment_id
end

#balanceDouble

Returns The current or end balance of this period.

Returns:

  • (Double)

    The current or end balance of this period.



82
83
84
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 82

def balance
  @balance
end

#createdDate-time

Returns The date on which this financial account balance history record was created.

Returns:

  • (Date-time)

    The date on which this financial account balance history record was created.



86
87
88
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 86

def created
  @created
end

#created_user_idUuid

Returns The ID number of the user who created this financial account balance history.

Returns:

  • (Uuid)

    The ID number of the user who created this financial account balance history.



90
91
92
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 90

def created_user_id
  @created_user_id
end

#financial_account_balance_history_idUuid

Returns The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.

Returns:

  • (Uuid)

    The unique ID of this record, automatically assigned by Lockstep when this record is added to the Lockstep platform.



46
47
48
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 46

def 
  @financial_account_balance_history_id
end

#financial_account_idUuid

Returns The id of the Financial Account that this balance history is for.

Returns:

  • (Uuid)

    The id of the Financial Account that this balance history is for.



54
55
56
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 54

def 
  @financial_account_id
end

#financial_yearInt32

Returns The financial year that this period falls under.

Returns:

  • (Int32)

    The financial year that this period falls under



62
63
64
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 62

def financial_year
  @financial_year
end

#group_keyUuid

Returns The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).

Returns:

  • (Uuid)

    The GroupKey uniquely identifies a single Lockstep Platform account. All records for this account will share the same GroupKey value. GroupKey values cannot be changed once created. For more information, see [Accounts and GroupKeys](developer.lockstep.io/docs/accounts-and-groupkeys).



50
51
52
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 50

def group_key
  @group_key
end

#modifiedDate-time

Returns The date on which this financial account balance history record was modified.

Returns:

  • (Date-time)

    The date on which this financial account balance history record was modified.



94
95
96
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 94

def modified
  @modified
end

#modified_user_idUuid

Returns The ID number of the user who most recently modified this financial account balance history.

Returns:

  • (Uuid)

    The ID number of the user who most recently modified this financial account balance history.



98
99
100
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 98

def modified_user_id
  @modified_user_id
end

#period_end_dateDate-time

Returns The end date of this period.

Returns:

  • (Date-time)

    The end date of this period.



74
75
76
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 74

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



66
67
68
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 66

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.



70
71
72
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 70

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.



78
79
80
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 78

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



102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 102

def as_json(options={})
    {
        'financialAccountBalanceHistoryId' => @financial_account_balance_history_id,
        'groupKey' => @group_key,
        'financialAccountId' => @financial_account_id,
        'appEnrollmentId' => @app_enrollment_id,
        'financialYear' => @financial_year,
        'periodNumber' => @period_number,
        'periodStartDate' => @period_start_date,
        'periodEndDate' => @period_end_date,
        'status' => @status,
        'balance' => @balance,
        'created' => @created,
        'createdUserId' => @created_user_id,
        'modified' => @modified,
        'modifiedUserId' => @modified_user_id,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



123
124
125
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 123

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