Class: LockstepSdk::FinancialReportRowModel
- Inherits:
-
Object
- Object
- LockstepSdk::FinancialReportRowModel
- Defined in:
- lib/lockstep_sdk/models/financial_report_row_model.rb
Overview
Represents a row of a financial Report report
Instance Attribute Summary collapse
-
#cells ⇒ FinancialReportCellModel
The cells of the row.
-
#label ⇒ String
The label for the row if it is a Classification, Category, or Subcategory.
-
#row_type ⇒ String
Describes what type of row this row is (Header, Summary, Classification, Category, Subcategory, Data).
-
#rows ⇒ FinancialReportRowModel
The sub rows of this row if it is a Classification, Category, or Subcategory.
Instance Method Summary collapse
-
#as_json(options = {}) ⇒ object
This object as a JSON key-value structure.
-
#initialize(params = {}) ⇒ FinancialReportRowModel
constructor
Initialize the FinancialReportRowModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
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
#cells ⇒ FinancialReportCellModel
Returns The cells of the row.
46 47 48 |
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 46 def cells @cells end |
#label ⇒ String
Returns 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_type ⇒ String
Returns 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 |
#rows ⇒ FinancialReportRowModel
Returns The sub rows of this row if it is a Classification, Category, or Subcategory.
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.
50 51 52 53 54 55 56 57 |
# File 'lib/lockstep_sdk/models/financial_report_row_model.rb', line 50 def as_json(={}) { 'rowType' => @row_type, 'label' => @label, 'rows' => @rows, 'cells' => @cells, } end |
#to_json(*options) ⇒ String
Returns 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(*) "[#{as_json(*options).to_json(*options)}]" end |