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



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

def cells
  @cells
end

#labelString



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

def label
  @label
end

#row_typeString



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

def row_type
  @row_type
end

#rowsFinancialReportRowModel



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



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



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