Class: LockstepSdk::TrialBalanceReportRowModel
- Inherits:
-
Object
- Object
- LockstepSdk::TrialBalanceReportRowModel
- 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
-
#cells ⇒ TrialBalanceReportCellModel
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 ⇒ TrialBalanceReportRowModel
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 = {}) ⇒ TrialBalanceReportRowModel
constructor
Initialize the TrialBalanceReportRowModel using the provided prototype.
-
#to_json(*options) ⇒ String
This object converted to a JSON string.
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
#cells ⇒ TrialBalanceReportCellModel
Returns The cells of the row.
48 49 50 |
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 48 def cells @cells end |
#label ⇒ String
Returns 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_type ⇒ String
Returns 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 |
#rows ⇒ TrialBalanceReportRowModel
Returns The sub rows of this row if it is a Classification, Category, or Subcategory.
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.
52 53 54 55 56 57 58 59 |
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 52 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.
63 64 65 |
# File 'lib/lockstep_sdk/models/trial_balance_report_row_model.rb', line 63 def to_json(*) "[#{as_json(*).to_json(*)}]" end |