Class: GetStream::Generated::Models::FeedsPreferences

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/getstream_ruby/generated/models/feeds_preferences.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 = {}) ⇒ FeedsPreferences

Initialize with attributes



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

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

#commentString



14
15
16
# File 'lib/getstream_ruby/generated/models/feeds_preferences.rb', line 14

def comment
  @comment
end

#comment_reactionString



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

def comment_reaction
  @comment_reaction
end

#comment_replyString



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

def comment_reply
  @comment_reply
end

#custom_activity_typesHash<String, String>



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

def custom_activity_types
  @custom_activity_types
end

#followString



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

def follow
  @follow
end

#mentionString



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

def mention
  @mention
end

#reactionString



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

def reaction
  @reaction
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/feeds_preferences.rb', line 47

def self.json_field_mappings
  {
    comment: 'comment',
    comment_reaction: 'comment_reaction',
    comment_reply: 'comment_reply',
    follow: 'follow',
    mention: 'mention',
    reaction: 'reaction',
    custom_activity_types: 'custom_activity_types'
  }
end