Class: GetStream::Generated::Models::UserRatingReportResponse

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

Initialize with attributes



20
21
22
23
24
# File 'lib/getstream_ruby/generated/models/user_rating_report_response.rb', line 20

def initialize(attributes = {})
  super(attributes)
  @average = attributes.fetch(:average) { attributes.fetch('average', nil) }
  @count = attributes.fetch(:count) { attributes.fetch('count', nil) }
end

Instance Attribute Details

#average ⇒ Float

Returns:

  • (Float)


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

def average
  @average
end

#count ⇒ Integer

Returns:

  • (Integer)


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

def count
  @count
end

Class Method Details

.json_field_mappings ⇒ Object

Override field mappings for JSON serialization



27
28
29
30
31
32
# File 'lib/getstream_ruby/generated/models/user_rating_report_response.rb', line 27

def self.json_field_mappings
  {
    average: 'average',
    count: 'count'
  }
end