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



35
36
37
38
39
40
41
42
43
44
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 35

def initialize(attributes = {})
  super(attributes)
  @type = attributes[:type] || attributes['type']
  @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

#create_notification_activityBoolean

Returns Whether to create a notification activity for this reaction.

Returns:

  • (Boolean)

    Whether to create a notification activity for this reaction



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

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



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

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)



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

def enforce_unique
  @enforce_unique
end

#skip_pushBoolean

Returns:

  • (Boolean)


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

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:



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

def user
  @user
end

#user_idString

Returns:

  • (String)


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

def user_id
  @user_id
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



47
48
49
50
51
52
53
54
55
56
57
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 47

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