Class: GetStream::Generated::Models::FeedsPreferences
- Defined in:
- lib/getstream_ruby/generated/models/feeds_preferences.rb
Instance Attribute Summary collapse
-
#comment ⇒ String
Push notification preference for comments on user’s activities.
-
#comment_mention ⇒ String
Push notification preference for mentions in comments.
-
#comment_reaction ⇒ String
Push notification preference for reactions on comments.
-
#comment_reply ⇒ String
Push notification preference for replies to comments.
-
#custom_activity_types ⇒ Hash<String, String>
Push notification preferences for custom activity types.
-
#follow ⇒ String
Push notification preference for new followers.
-
#mention ⇒ String
Push notification preference for mentions in activities.
-
#reaction ⇒ String
Push notification preference for reactions on user’s activities or comments.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ FeedsPreferences
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ FeedsPreferences
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 38 def initialize(attributes = {}) super(attributes) @comment = attributes[:comment] || attributes['comment'] || nil @comment_mention = attributes[:comment_mention] || attributes['comment_mention'] || nil @comment_reaction = attributes[:comment_reaction] || attributes['comment_reaction'] || nil @comment_reply = attributes[:comment_reply] || attributes['comment_reply'] || nil @follow = attributes[:follow] || attributes['follow'] || nil @mention = attributes[:mention] || attributes['mention'] || nil @reaction = attributes[:reaction] || attributes['reaction'] || nil @custom_activity_types = attributes[:custom_activity_types] || attributes['custom_activity_types'] || nil end |
Instance Attribute Details
#comment ⇒ String
Returns Push notification preference for comments on user’s activities. One of: all, none.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 14 def comment @comment end |
#comment_mention ⇒ String
Returns Push notification preference for mentions in comments. One of: all, none.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 17 def comment_mention @comment_mention end |
#comment_reaction ⇒ String
Returns Push notification preference for reactions on comments. One of: all, none.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 20 def comment_reaction @comment_reaction end |
#comment_reply ⇒ String
Returns Push notification preference for replies to comments. One of: all, none.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 23 def comment_reply @comment_reply end |
#custom_activity_types ⇒ Hash<String, String>
Returns Push notification preferences for custom activity types. Map of activity type to preference (all or none).
35 36 37 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 35 def custom_activity_types @custom_activity_types end |
#follow ⇒ String
Returns Push notification preference for new followers. One of: all, none.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 26 def follow @follow end |
#mention ⇒ String
Returns Push notification preference for mentions in activities. One of: all, none.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 29 def mention @mention end |
#reaction ⇒ String
Returns Push notification preference for reactions on user’s activities or comments. One of: all, none.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 32 def reaction @reaction 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/feeds_preferences.rb', line 51 def self.json_field_mappings { comment: 'comment', comment_mention: 'comment_mention', comment_reaction: 'comment_reaction', comment_reply: 'comment_reply', follow: 'follow', mention: 'mention', reaction: 'reaction', custom_activity_types: 'custom_activity_types' } end |