Class: GetStream::Generated::Models::TrackActivityMetricsEventResult
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::TrackActivityMetricsEventResult
- Defined in:
- lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb
Overview
Result of tracking a single metric event
Instance Attribute Summary collapse
-
#activity_id ⇒ String
The activity ID from the request.
-
#allowed ⇒ Boolean
Whether the metric was counted (false if rate-limited).
-
#error ⇒ String
Error message if processing failed.
-
#metric ⇒ String
The metric name from the request.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ TrackActivityMetricsEventResult
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ TrackActivityMetricsEventResult
Initialize with attributes
26 27 28 29 30 31 32 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 26 def initialize(attributes = {}) super(attributes) @activity_id = attributes[:activity_id] || attributes['activity_id'] @allowed = attributes[:allowed] || attributes['allowed'] @metric = attributes[:metric] || attributes['metric'] @error = attributes[:error] || attributes['error'] || nil end |
Instance Attribute Details
#activity_id ⇒ String
Returns The activity ID from the request.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 14 def activity_id @activity_id end |
#allowed ⇒ Boolean
Returns Whether the metric was counted (false if rate-limited).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 17 def allowed @allowed end |
#error ⇒ String
Returns Error message if processing failed.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 23 def error @error end |
#metric ⇒ String
Returns The metric name from the request.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 20 def metric @metric end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
35 36 37 38 39 40 41 42 |
# File 'lib/getstream_ruby/generated/models/track_activity_metrics_event_result.rb', line 35 def self.json_field_mappings { activity_id: 'activity_id', allowed: 'allowed', metric: 'metric', error: 'error' } end |