Class: GetStream::Generated::Models::DailyMetricStatsResponse
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::DailyMetricStatsResponse
- Defined in:
- lib/getstream_ruby/generated/models/daily_metric_stats_response.rb
Instance Attribute Summary collapse
-
#daily ⇒ Array<DailyMetricResponse>
Array of daily metric values.
-
#total ⇒ Integer
Total value across all days in the date range.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ DailyMetricStatsResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ DailyMetricStatsResponse
Initialize with attributes
20 21 22 23 24 |
# File 'lib/getstream_ruby/generated/models/daily_metric_stats_response.rb', line 20 def initialize(attributes = {}) super(attributes) @total = attributes[:total] || attributes['total'] @daily = attributes[:daily] || attributes['daily'] end |
Instance Attribute Details
#daily ⇒ Array<DailyMetricResponse>
Returns Array of daily metric values.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/daily_metric_stats_response.rb', line 17 def daily @daily end |
#total ⇒ Integer
Returns Total value across all days in the date range.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/daily_metric_stats_response.rb', line 14 def total @total end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/daily_metric_stats_response.rb', line 27 def self.json_field_mappings { total: 'total', daily: 'daily' } end |