Class: LockstepSdk::FinancialAccountModel

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

Overview

An Financial account refers to records of assets, liabilities, income, expenses, and equity.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ FinancialAccountModel

Initialize the FinancialAccountModel using the provided prototype



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

def initialize(params = {})
    @financial_account_id = params.dig(:financial_account_id)
    @group_key = params.dig(:group_key)
    @code = params.dig(:code)
    @erp_key = params.dig(:erp_key)
    @app_enrollment_id = params.dig(:app_enrollment_id)
    @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)
    @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 App Enrollment Id for the Financial Account.

Returns:

  • (Uuid)

    The App Enrollment Id for the Financial Account.



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

def app_enrollment_id
  @app_enrollment_id
end

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



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

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



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

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.



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

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.



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

def code
  @code
end

#createdDate-time

Returns The date the FinancialAccount was created.

Returns:

  • (Date-time)

    The date the FinancialAccount was created.



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

def created
  @created
end

#created_user_idUuid

Returns The user that has created the Financial Account.

Returns:

  • (Uuid)

    The user that has created the Financial Account.



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

def created_user_id
  @created_user_id
end

#descriptionString

Returns The description for the Financial Account.

Returns:

  • (String)

    The description for the Financial Account.



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

def description
  @description
end

#erp_keyString

Returns The External Id for the Financial Account.

Returns:

  • (String)

    The External Id for the Financial Account.



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

def erp_key
  @erp_key
end

#financial_account_idUuid

Returns The unique identifier for the Financial Account.

Returns:

  • (Uuid)

    The unique identifier for the Financial Account.



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

def 
  @financial_account_id
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_model.rb', line 50

def group_key
  @group_key
end

#modifiedDate-time

Returns The date the Financial Account was modified.

Returns:

  • (Date-time)

    The date the Financial Account was modified.



102
103
104
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 102

def modified
  @modified
end

#modified_user_idUuid

Returns The user that has modified the Financial Account.

Returns:

  • (Uuid)

    The user that has modified the Financial Account.



106
107
108
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 106

def modified_user_id
  @modified_user_id
end

#nameString

Returns The name of the Financial Account.

Returns:

  • (String)

    The name of the Financial Account.



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

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.



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

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.



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

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



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 110

def as_json(options={})
    {
        'financialAccountId' => @financial_account_id,
        'groupKey' => @group_key,
        'code' => @code,
        'erpKey' => @erp_key,
        'appEnrollmentId' => @app_enrollment_id,
        'name' => @name,
        'status' => @status,
        'cashflowType' => @cashflow_type,
        'description' => @description,
        'classification' => @classification,
        'category' => @category,
        'subcategory' => @subcategory,
        '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



133
134
135
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 133

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