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



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

def initialize(params = {})
     = 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.



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

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.



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

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



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

def category
  @category
end

#classificationString

Returns The classification for the Financial Account. Possible values are Asset, Equity, Expense, Liability or Revenue.

Returns:

  • (String)

    The classification for the Financial Account. Possible values are Asset, Equity, Expense, Liability or Revenue.



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

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.



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

def code
  @code
end

#createdDate-time

Returns The date the FinancialAccount was created.

Returns:

  • (Date-time)

    The date the FinancialAccount was created.



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

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.



100
101
102
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 100

def created_user_id
  @created_user_id
end

#descriptionString

Returns The description for the Financial Account.

Returns:

  • (String)

    The description for the Financial Account.



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

def description
  @description
end

#erp_keyString

Returns The External Id for the Financial Account.

Returns:

  • (String)

    The External Id for the Financial Account.



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

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.



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

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



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

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.



104
105
106
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 104

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.



108
109
110
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 108

def modified_user_id
  @modified_user_id
end

#nameString

Returns The name of the Financial Account.

Returns:

  • (String)

    The name of the Financial Account.



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

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.



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

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.



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

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



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

def as_json(options={})
    {
        'financialAccountId' => ,
        '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



135
136
137
# File 'lib/lockstep_sdk/models/financial_account_model.rb', line 135

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