Class: GetStream::Generated::Models::EnrichedActivity

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

Initialize with attributes



50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 50

def initialize(attributes = {})
  super(attributes)
  @foreign_id = attributes[:foreign_id] || attributes['foreign_id'] || nil
  @id = attributes[:id] || attributes['id'] || nil
  @score = attributes[:score] || attributes['score'] || nil
  @verb = attributes[:verb] || attributes['verb'] || nil
  @to = attributes[:to] || attributes['to'] || nil
  @actor = attributes[:actor] || attributes['actor'] || nil
  @latest_reactions = attributes[:latest_reactions] || attributes['latest_reactions'] || nil
  @object = attributes[:object] || attributes['object'] || nil
  @origin = attributes[:origin] || attributes['origin'] || nil
  @own_reactions = attributes[:own_reactions] || attributes['own_reactions'] || nil
  @reaction_counts = attributes[:reaction_counts] || attributes['reaction_counts'] || nil
  @target = attributes[:target] || attributes['target'] || nil
end

Instance Attribute Details

#actorData



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

def actor
  @actor
end

#foreign_idString



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

def foreign_id
  @foreign_id
end

#idString



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

def id
  @id
end

#latest_reactionsHash<String, Array<EnrichedReaction>>



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

def latest_reactions
  @latest_reactions
end

#objectData



35
36
37
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 35

def object
  @object
end

#originData



38
39
40
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 38

def origin
  @origin
end

#own_reactionsHash<String, Array<EnrichedReaction>>



41
42
43
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 41

def own_reactions
  @own_reactions
end

#reaction_countsHash<String, Integer>



44
45
46
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 44

def reaction_counts
  @reaction_counts
end

#scoreFloat



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

def score
  @score
end

#targetData



47
48
49
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 47

def target
  @target
end

#toArray<String>



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

def to
  @to
end

#verbString



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

def verb
  @verb
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/getstream_ruby/generated/models/enriched_activity.rb', line 67

def self.json_field_mappings
  {
    foreign_id: 'foreign_id',
    id: 'id',
    score: 'score',
    verb: 'verb',
    to: 'to',
    actor: 'actor',
    latest_reactions: 'latest_reactions',
    object: 'object',
    origin: 'origin',
    own_reactions: 'own_reactions',
    reaction_counts: 'reaction_counts',
    target: 'target'
  }
end