Class: LockstepSdk::FinancialReportRowModel

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

Overview

Represents a row of a financial Report report

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}) ⇒ FinancialReportRowModel

Initialize the FinancialReportRowModel using the provided prototype



25
26
27
28
29
30
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 25

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

#cellsFinancialReportCellModel

Returns The cells of the row.

Returns:



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

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.



38
39
40
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 38

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)



34
35
36
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 34

def row_type
  @row_type
end

#rowsFinancialReportRowModel

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

Returns:



42
43
44
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 42

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



50
51
52
53
54
55
56
57
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 50

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



61
62
63
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 61

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