Class: GetStream::Generated::Models::ReactionResponse
- Defined in:
- lib/getstream_ruby/generated/models/reaction_response.rb
Instance Attribute Summary collapse
-
#created_at ⇒ DateTime
Date/time of creation.
-
#custom ⇒ Object
Custom data for this object.
-
#message_id ⇒ String
Message ID.
-
#score ⇒ Integer
Score of the reaction.
-
#type ⇒ String
Type of reaction.
-
#updated_at ⇒ DateTime
Date/time of the last update.
- #user ⇒ UserResponse
-
#user_id ⇒ String
User ID.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ ReactionResponse
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ ReactionResponse
Initialize with attributes
38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/getstream_ruby/generated/models/reaction_response.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'] @user_id = attributes[:user_id] || attributes['user_id'] @custom = attributes[:custom] || attributes['custom'] @user = attributes[:user] || attributes['user'] end |
Instance Attribute Details
#created_at ⇒ DateTime
Returns Date/time of creation.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 14 def created_at @created_at end |
#custom ⇒ Object
Returns Custom data for this object.
32 33 34 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 32 def custom @custom end |
#message_id ⇒ String
Returns Message ID.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 17 def @message_id end |
#score ⇒ Integer
Returns Score of the reaction.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 20 def score @score end |
#type ⇒ String
Returns Type of reaction.
23 24 25 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 23 def type @type end |
#updated_at ⇒ DateTime
Returns Date/time of the last update.
26 27 28 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 26 def updated_at @updated_at end |
#user ⇒ UserResponse
35 36 37 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 35 def user @user end |
#user_id ⇒ String
Returns User ID.
29 30 31 |
# File 'lib/getstream_ruby/generated/models/reaction_response.rb', line 29 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_response.rb', line 51 def self.json_field_mappings { created_at: 'created_at', message_id: 'message_id', score: 'score', type: 'type', updated_at: 'updated_at', user_id: 'user_id', custom: 'custom', user: 'user' } end |