Class: GetStream::Generated::Models::AddCommentReactionRequest
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::AddCommentReactionRequest
- Defined in:
- lib/getstream_ruby/generated/models/add_comment_reaction_request.rb
Instance Attribute Summary collapse
-
#create_notification_activity ⇒ Boolean
Whether to create a notification activity for this reaction.
-
#custom ⇒ Object
Optional custom data to add to the reaction.
-
#enforce_unique ⇒ Boolean
Whether to enforce unique reactions per user (remove other reaction types from the user when adding this one).
- #skip_push ⇒ Boolean
-
#type ⇒ String
The type of reaction, eg upvote, like, …
- #user ⇒ UserRequest
- #user_id ⇒ String
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ AddCommentReactionRequest
constructor
Initialize with attributes.
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_activity ⇒ Boolean
Returns 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 |
#custom ⇒ Object
Returns 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_unique ⇒ Boolean
Returns 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_push ⇒ Boolean
23 24 25 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 23 def skip_push @skip_push end |
#type ⇒ String
Returns 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 |
#user ⇒ UserRequest
32 33 34 |
# File 'lib/getstream_ruby/generated/models/add_comment_reaction_request.rb', line 32 def user @user end |
#user_id ⇒ 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_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/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 |