Class: GetStream::Generated::Models::AddReactionRequest
- Defined in:
- lib/getstream_ruby/generated/models/add_reaction_request.rb
Instance Attribute Summary collapse
-
#copy_custom_to_notification ⇒ Object
deprecated
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
-
#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
39 40 41 42 43 44 45 46 47 48 49 |
# File 'lib/getstream_ruby/generated/models/add_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_notification ⇒ Object
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_reaction_request.rb', line 18 def copy_custom_to_notification @copy_custom_to_notification end |
#create_notification_activity ⇒ Boolean
Returns Whether to create a notification activity for this reaction.
21 22 23 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 21 def create_notification_activity @create_notification_activity end |
#custom ⇒ Object
Returns Custom data for the reaction.
33 34 35 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 33 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).
24 25 26 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 24 def enforce_unique @enforce_unique end |
#skip_push ⇒ Boolean
27 28 29 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 27 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
36 37 38 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 36 def user @user end |
#user_id ⇒ String
30 31 32 |
# File 'lib/getstream_ruby/generated/models/add_reaction_request.rb', line 30 def user_id @user_id end |
Class Method Details
.json_field_mappings ⇒ Object
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_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 |