Class: GetStream::Generated::Models::ReactionResponse

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

Returns Date/time of creation.

Returns:

  • (DateTime)

    Date/time of creation



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

def created_at
  @created_at
end

#customObject

Returns Custom data for this object.

Returns:

  • (Object)

    Custom data for this object



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

def custom
  @custom
end

#message_idString

Returns Message ID.

Returns:

  • (String)

    Message ID



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

def message_id
  @message_id
end

#scoreInteger

Returns Score of the reaction.

Returns:

  • (Integer)

    Score of the reaction



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

def score
  @score
end

#typeString

Returns Type of reaction.

Returns:

  • (String)

    Type of reaction



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

def type
  @type
end

#updated_atDateTime

Returns Date/time of the last update.

Returns:

  • (DateTime)

    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

#userUserResponse

Returns:



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

def user
  @user
end

#user_idString

Returns User ID.

Returns:

  • (String)

    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_mappingsObject

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