Class: GetStream::Generated::Models::Reaction
- Inherits:
-
BaseModel
- Object
- BaseModel
- GetStream::Generated::Models::Reaction
show all
- Defined in:
- lib/getstream_ruby/generated/models/reaction.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 = {}) ⇒ Reaction
Initialize with attributes
38
39
40
41
42
43
44
45
46
47
48
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 38
def initialize(attributes = {})
super(attributes)
@created_at = attributes[:created_at] || attributes['created_at']
@message_id = attributes[:message_id] || attributes['message_id']
@score = attributes[:score] || attributes['score']
@type = attributes[:type] || attributes['type']
@updated_at = attributes[:updated_at] || attributes['updated_at']
@custom = attributes[:custom] || attributes['custom']
@user_id = attributes[:user_id] || attributes['user_id'] || nil
@user = attributes[:user] || attributes['user'] || nil
end
|
Instance Attribute Details
#created_at ⇒ DateTime
14
15
16
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 14
def created_at
@created_at
end
|
#custom ⇒ Object
29
30
31
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 29
def custom
@custom
end
|
#message_id ⇒ String
17
18
19
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 17
def message_id
@message_id
end
|
#score ⇒ Integer
20
21
22
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 20
def score
@score
end
|
#type ⇒ String
23
24
25
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 23
def type
@type
end
|
#updated_at ⇒ DateTime
26
27
28
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 26
def updated_at
@updated_at
end
|
35
36
37
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 35
def user
@user
end
|
#user_id ⇒ String
32
33
34
|
# File 'lib/getstream_ruby/generated/models/reaction.rb', line 32
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/reaction.rb', line 51
def self.json_field_mappings
{
created_at: 'created_at',
message_id: 'message_id',
score: 'score',
type: 'type',
updated_at: 'updated_at',
custom: 'custom',
user_id: 'user_id',
user: 'user'
}
end
|