Class: GetStream::Generated::Models::UpsertActivitiesRequest
- Defined in:
- lib/getstream_ruby/generated/models/upsert_activities_request.rb
Instance Attribute Summary collapse
-
#activities ⇒ Array<ActivityRequest>
List of activities to create or update.
-
#create_system_feeds ⇒ Boolean
Server-side only.
-
#create_users ⇒ Boolean
Server-side only.
-
#enrich_own_fields ⇒ Boolean
If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership).
-
#force_moderation ⇒ Boolean
If true, forces moderation to run for server-side requests.
-
#skip_existing ⇒ Boolean
Server-side only.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ UpsertActivitiesRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ UpsertActivitiesRequest
Initialize with attributes
32 33 34 35 36 37 38 39 40 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 32 def initialize(attributes = {}) super(attributes) @activities = attributes.fetch(:activities) { attributes.fetch('activities', nil) } @create_system_feeds = attributes.fetch(:create_system_feeds) { attributes.fetch('create_system_feeds', nil) } @create_users = attributes.fetch(:create_users) { attributes.fetch('create_users', nil) } @enrich_own_fields = attributes.fetch(:enrich_own_fields) { attributes.fetch('enrich_own_fields', nil) } @force_moderation = attributes.fetch(:force_moderation) { attributes.fetch('force_moderation', nil) } @skip_existing = attributes.fetch(:skip_existing) { attributes.fetch('skip_existing', nil) } end |
Instance Attribute Details
#activities ⇒ Array<ActivityRequest>
Returns List of activities to create or update.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 14 def activities @activities end |
#create_system_feeds ⇒ Boolean
Returns Server-side only. If true, a missing feed whose id is not a user id (e.g. game:123) is created as a system feed with no user owner. Missing feeds named after an existing user are created either way. Built-in groups (such as user, timeline and notification) and notification groups still require a user. Default: false.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 17 def create_system_feeds @create_system_feeds end |
#create_users ⇒ Boolean
Returns Server-side only. If true, auto-creates users referenced by activity user_id values that don't already exist. Default: false.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 20 def create_users @create_users end |
#enrich_own_fields ⇒ Boolean
Returns If true, enriches the activities' current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 23 def enrich_own_fields @enrich_own_fields end |
#force_moderation ⇒ Boolean
Returns If true, forces moderation to run for server-side requests. By default, server-side requests skip moderation. Client-side requests always run moderation regardless of this field.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 26 def force_moderation @force_moderation end |
#skip_existing ⇒ Boolean
Returns Server-side only. If true, activities whose id already exists are left unchanged instead of updated: no write, events or notifications. They are listed in skipped_existing and returned as stored. Soft-deleted activities count as existing and are returned with deleted_at set. Default: false.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 29 def skip_existing @skip_existing end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
43 44 45 46 47 48 49 50 51 52 |
# File 'lib/getstream_ruby/generated/models/upsert_activities_request.rb', line 43 def self.json_field_mappings { activities: 'activities', create_system_feeds: 'create_system_feeds', create_users: 'create_users', enrich_own_fields: 'enrich_own_fields', force_moderation: 'force_moderation', skip_existing: 'skip_existing' } end |