Class: Retab::WorkflowTableRowsResponse
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- Retab::WorkflowTableRowsResponse
- Defined in:
- lib/retab/tables/workflow_table_rows_response.rb
Constant Summary collapse
- HASH_ATTRS =
{ table_id: :table_id, columns: :columns, rows: :rows, row_count: :row_count, filtered_row_count: :filtered_row_count, offset: :offset, limit: :limit, has_more: :has_more, next_cursor: :next_cursor, previous_cursor: :previous_cursor, explain: :explain }.freeze
Instance Attribute Summary collapse
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#explain ⇒ Object
Returns the value of attribute explain.
-
#filtered_row_count ⇒ Object
Returns the value of attribute filtered_row_count.
-
#has_more ⇒ Object
Returns the value of attribute has_more.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
-
#offset ⇒ Object
Returns the value of attribute offset.
-
#previous_cursor ⇒ Object
Returns the value of attribute previous_cursor.
-
#row_count ⇒ Object
Returns the value of attribute row_count.
-
#rows ⇒ Object
Returns the value of attribute rows.
-
#table_id ⇒ Object
Returns the value of attribute table_id.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ WorkflowTableRowsResponse
constructor
A new instance of WorkflowTableRowsResponse.
Methods inherited from Types::BaseModel
deep_symbolize, #inspect, normalize, #to_h, #to_json
Constructor Details
#initialize(json) ⇒ WorkflowTableRowsResponse
Returns a new instance of WorkflowTableRowsResponse.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 36 def initialize(json) super() hash = self.class.normalize(json) @table_id = hash[:table_id] @columns = (hash[:columns] || []).map { |item| item ? Retab::WorkflowTableColumn.new(item) : nil } @rows = (hash[:rows] || []).map { |item| item ? Retab::WorkflowTableRow.new(item) : nil } @row_count = hash[:row_count] @filtered_row_count = hash[:filtered_row_count] @offset = hash[:offset] @limit = hash[:limit] @has_more = hash[:has_more].nil? ? false : hash[:has_more] @next_cursor = hash[:next_cursor] @previous_cursor = hash[:previous_cursor] @explain = hash[:explain] ? Retab::WorkflowTableExplain.new(hash[:explain]) : nil end |
Instance Attribute Details
#columns ⇒ Object
Returns the value of attribute columns.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def columns @columns end |
#explain ⇒ Object
Returns the value of attribute explain.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def explain @explain end |
#filtered_row_count ⇒ Object
Returns the value of attribute filtered_row_count.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def filtered_row_count @filtered_row_count end |
#has_more ⇒ Object
Returns the value of attribute has_more.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def has_more @has_more end |
#limit ⇒ Object
Returns the value of attribute limit.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def limit @limit end |
#next_cursor ⇒ Object
Returns the value of attribute next_cursor.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def next_cursor @next_cursor end |
#offset ⇒ Object
Returns the value of attribute offset.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def offset @offset end |
#previous_cursor ⇒ Object
Returns the value of attribute previous_cursor.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def previous_cursor @previous_cursor end |
#row_count ⇒ Object
Returns the value of attribute row_count.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def row_count @row_count end |
#rows ⇒ Object
Returns the value of attribute rows.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def rows @rows end |
#table_id ⇒ Object
Returns the value of attribute table_id.
22 23 24 |
# File 'lib/retab/tables/workflow_table_rows_response.rb', line 22 def table_id @table_id end |