Class: GetStream::Generated::Models::ActivitySelectorConfig
- Defined in:
- lib/getstream_ruby/generated/models/activity_selector_config.rb
Instance Attribute Summary collapse
-
#cutoff_time ⇒ String
Time threshold for activity selection (string).
-
#cutoff_window ⇒ String
Flexible relative time window for activity selection (e.g., ‘1h’, ‘3d’, ‘1y’).
-
#filter ⇒ Object
Filter for activity selection.
-
#min_popularity ⇒ Integer
Minimum popularity threshold.
- #params ⇒ Object
-
#sort ⇒ Array<SortParamRequest>
Sort parameters for activity selection.
-
#type ⇒ String
Type of selector.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ActivitySelectorConfig
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ActivitySelectorConfig
Initialize with attributes
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 35 def initialize(attributes = {}) super(attributes) @type = attributes[:type] || attributes['type'] @cutoff_time = attributes[:cutoff_time] || attributes['cutoff_time'] || nil @cutoff_window = attributes[:cutoff_window] || attributes['cutoff_window'] || nil @min_popularity = attributes[:min_popularity] || attributes['min_popularity'] || nil @sort = attributes[:sort] || attributes['sort'] || nil @filter = attributes[:filter] || attributes['filter'] || nil @params = attributes[:params] || attributes['params'] || nil end |
Instance Attribute Details
#cutoff_time ⇒ String
Returns Time threshold for activity selection (string). Expected RFC3339 format (e.g., 2006-01-02T15:04:05Z07:00). Cannot be used together with cutoff_window.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 17 def cutoff_time @cutoff_time end |
#cutoff_window ⇒ String
Returns Flexible relative time window for activity selection (e.g., ‘1h’, ‘3d’, ‘1y’). Activities older than this duration will be filtered out. Cannot be used together with cutoff_time.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 20 def cutoff_window @cutoff_window end |
#filter ⇒ Object
Returns Filter for activity selection.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 29 def filter @filter end |
#min_popularity ⇒ Integer
Returns Minimum popularity threshold.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 23 def min_popularity @min_popularity end |
#params ⇒ Object
32 33 34 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 32 def params @params end |
#sort ⇒ Array<SortParamRequest>
Returns Sort parameters for activity selection.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 26 def sort @sort end |
#type ⇒ String
Returns Type of selector.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 14 def type @type end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/getstream_ruby/generated/models/activity_selector_config.rb', line 47 def self.json_field_mappings { type: 'type', cutoff_time: 'cutoff_time', cutoff_window: 'cutoff_window', min_popularity: 'min_popularity', sort: 'sort', filter: 'filter', params: 'params' } end |