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



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

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.



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

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.



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

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.



84
85
86
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 84

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.



88
89
90
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 88

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.



44
45
46
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 44

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.



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

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



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

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



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

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.



92
93
94
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 92

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.



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

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.



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

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



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

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.



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

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.



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

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



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

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



121
122
123
# File 'lib/lockstep_sdk/models/financial_account_balance_history_model.rb', line 121

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