Class: GetStream::Generated::Models::AddCommentReactionRequest

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/add_comment_reaction_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 = {}) ⇒ AddCommentReactionRequest

Initialize with attributes



39
40
41
42
43
44
45
46
47
48
49
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 39

def initialize(attributes = {})
  super(attributes)
  @type = attributes[:type] || attributes['type']
  @copy_custom_to_notification = attributes[:copy_custom_to_notification] || attributes['copy_custom_to_notification'] || nil
  @create_notification_activity = attributes[:create_notification_activity] || attributes['create_notification_activity'] || nil
  @enforce_unique = attributes[:enforce_unique] || attributes['enforce_unique'] || nil
  @skip_push = attributes[:skip_push] || attributes['skip_push'] || nil
  @user_id = attributes[:user_id] || attributes['user_id'] || nil
  @custom = attributes[:custom] || attributes['custom'] || nil
  @user = attributes[:user] || attributes['user'] || nil
end

Instance Attribute Details

#copy_custom_to_notificationObject

Deprecated.

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



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

def copy_custom_to_notification
  @copy_custom_to_notification
end

#create_notification_activityBoolean

Returns Whether to create a notification activity for this reaction.

Returns:

  • (Boolean)

    Whether to create a notification activity for this reaction



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

def create_notification_activity
  @create_notification_activity
end

#customObject

Returns Optional custom data to add to the reaction.

Returns:

  • (Object)

    Optional custom data to add to the reaction



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

def custom
  @custom
end

#enforce_uniqueBoolean

Returns Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one).

Returns:

  • (Boolean)

    Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one)



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

def enforce_unique
  @enforce_unique
end

#skip_pushBoolean

Returns:

  • (Boolean)


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

def skip_push
  @skip_push
end

#typeString

Returns The type of reaction, eg upvote, like, …

Returns:

  • (String)

    The type of reaction, eg upvote, like, …



14
15
16
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 14

def type
  @type
end

#userUserRequest

Returns:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



52
53
54
55
56
57
58
59
60
61
62
63
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 52

def self.json_field_mappings
  {
    type: 'type',
    copy_custom_to_notification: 'copy_custom_to_notification',
    create_notification_activity: 'create_notification_activity',
    enforce_unique: 'enforce_unique',
    skip_push: 'skip_push',
    user_id: 'user_id',
    custom: 'custom',
    user: 'user'
  }
end