Class: GetStream::Generated::Models::AddReactionRequest
- Defined in:
- lib/getstream_ruby/generated/models/add_reaction_request.rb
Instance Attribute Summary collapse
-
#copy_custom_to_notification ⇒ Boolean
Whether to copy custom data to the notification activity (only applies when create_notification_activity is true).
-
#create_notification_activity ⇒ Boolean
Whether to create a notification activity for this reaction.
-
#custom ⇒ Object
Custom data for 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
Type of reaction.
- #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 = {}) ⇒ AddReactionRequest
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ AddReactionRequest
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 38 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_notification ⇒ Boolean
Returns Whether to copy custom data to the notification activity (only applies when create_notification_activity is true).
17 18 19 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 17 def copy_custom_to_notification @copy_custom_to_notification end |
#create_notification_activity ⇒ Boolean
Returns Whether to create a notification activity for this reaction.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 20 def create_notification_activity @create_notification_activity end |
#custom ⇒ Object
Returns Custom data for the reaction.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 32 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).
23 24 25 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 23 def enforce_unique @enforce_unique end |
#skip_push ⇒ Boolean
26 27 28 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 26 def skip_push @skip_push end |
#type ⇒ String
Returns Type of reaction.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 14 def type @type end |
#user ⇒ UserRequest
35 36 37 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 35 def user @user end |
#user_id ⇒ String
29 30 31 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 29 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 51 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 |