Class: GetStream::Generated::Models::UpdateActivityPartialRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/update_activity_partial_request.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#==, #inspect, omit_empty_fields, #to_h, #to_json

Constructor Details

#initialize(attributes = {}) ⇒ UpdateActivityPartialRequest

Initialize with attributes



42
43
44
45
46
47
48
49
50
51
52
53
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 42

def initialize(attributes = {})
  super(attributes)
  @copy_custom_to_notification = attributes.fetch(:copy_custom_to_notification) { attributes.fetch('copy_custom_to_notification', 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) }
  @handle_mention_notifications = attributes.fetch(:handle_mention_notifications) { attributes.fetch('handle_mention_notifications', nil) }
  @run_activity_processors = attributes.fetch(:run_activity_processors) { attributes.fetch('run_activity_processors', nil) }
  @user_id = attributes.fetch(:user_id) { attributes.fetch('user_id', nil) }
  @unset = attributes.fetch(:unset) { attributes.fetch('unset', nil) }
  @set = attributes.fetch(:set) { attributes.fetch('set', nil) }
  @user = attributes.fetch(:user) { attributes.fetch('user', nil) }
end

Instance Attribute Details

#copy_custom_to_notification ⇒ Object

Deprecated.

This field is deprecated. @return [Boolean] Whether to copy custom data to the notification activity (only applies when handle_mention_notifications creates notifications) Deprecated: use notification_context.trigger.custom and notification_context.target.custom instead

Model attributes



15
16
17
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 15

def copy_custom_to_notification
  @copy_custom_to_notification
end

#enrich_own_fields ⇒ Boolean

Returns If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.

Returns:

  • (Boolean) —

    If true, enriches the activity's current_feed with own_* fields (own_follows, own_followings, own_capabilities, own_membership). Defaults to false for performance.



18
19
20
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 18

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.

Returns:

  • (Boolean) —

    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.



21
22
23
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 21

def force_moderation
  @force_moderation
end

#handle_mention_notifications ⇒ Boolean

Returns If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned.

Returns:

  • (Boolean) —

    If true, creates notification activities for newly mentioned users and deletes notifications for users no longer mentioned



24
25
26
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 24

def handle_mention_notifications
  @handle_mention_notifications
end

#run_activity_processors ⇒ Boolean

Returns If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.

Returns:

  • (Boolean) —

    If true, runs activity processors on the updated activity. Processors will only run if the activity text and/or attachments are changed. Defaults to false.



27
28
29
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 27

def run_activity_processors
  @run_activity_processors
end

#set ⇒ Object

Returns Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name').

Returns:

  • (Object) —

    Map of field names to new values. Supported fields: 'text', 'attachments', 'custom', 'visibility', 'visibility_tag', 'restrict_replies' (values: 'everyone', 'people_i_follow', 'nobody'), 'location', 'expires_at', 'filter_tags', 'interest_tags', 'poll_id', 'feeds', 'mentioned_user_ids', 'search_data'. For custom fields, use dot-notation (e.g., 'custom.field_name')



36
37
38
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 36

def set
  @set
end

#unset ⇒ Array<String>

Returns List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name').

Returns:

  • (Array<String>) —

    List of field names to remove. Supported fields: 'custom', 'visibility_tag', 'location', 'expires_at', 'filter_tags', 'interest_tags', 'attachments', 'poll_id', 'mentioned_user_ids', 'search_data'. Use dot-notation for nested custom fields (e.g., 'custom.field_name')



33
34
35
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 33

def unset
  @unset
end

#user ⇒ UserRequest

Returns User request object.

Returns:



39
40
41
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 39

def user
  @user
end

#user_id ⇒ String

Returns:

  • (String)


30
31
32
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 30

def user_id
  @user_id
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



56
57
58
59
60
61
62
63
64
65
66
67
68
# File 'lib/getstream_ruby/generated/models/update_activity_partial_request.rb', line 56

def self.json_field_mappings
  {
    copy_custom_to_notification: 'copy_custom_to_notification',
    enrich_own_fields: 'enrich_own_fields',
    force_moderation: 'force_moderation',
    handle_mention_notifications: 'handle_mention_notifications',
    run_activity_processors: 'run_activity_processors',
    user_id: 'user_id',
    unset: 'unset',
    set: 'set',
    user: 'user'
  }
end