Class: LockstepSdk::TrialBalanceReportRowModel

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

Overview

Represents a row of a trial balance report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ TrialBalanceReportRowModel

Initialize the TrialBalanceReportRowModel using the provided prototype



27
28
29
30
31
32
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 27

def initialize(params = {})
    @row_type = params.dig(:row_type)
    @label = params.dig(:label)
    @rows = params.dig(:rows)
    @cells = params.dig(:cells)
end

Instance Attribute Details

#cellsTrialBalanceReportCellModel

Returns The cells of the row.

Returns:



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

def cells
  @cells
end

#labelString

Returns The label for the row if it is a Classification, Category, or Subcategory.

Returns:

  • (String)

    The label for the row if it is a Classification, Category, or Subcategory.



40
41
42
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 40

def label
  @label
end

#row_typeString

Returns Describes what type of row this row is (Header, Summary, Classification, Category, Subcategory, Data).

Returns:

  • (String)

    Describes what type of row this row is (Header, Summary, Classification, Category, Subcategory, Data)



36
37
38
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 36

def row_type
  @row_type
end

#rowsTrialBalanceReportRowModel

Returns The sub rows of this row if it is a Classification, Category, or Subcategory.

Returns:



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

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



52
53
54
55
56
57
58
59
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 52

def as_json(options={})
    {
        'rowType' => @row_type,
        'label' => @label,
        'rows' => @rows,
        'cells' => @cells,
    }
end

#to_json(*options) ⇒ String

Returns This object converted to a JSON string.

Returns:

  • (String)

    This object converted to a JSON string



63
64
65
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 63

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