Class: GetStream::Generated::Models::ReportByHistogramBucket

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

Initialize with attributes



29
30
31
32
33
34
35
36
# File 'lib/getstream_ruby/generated/models/report_by_histogram_bucket.rb', line 29

def initialize(attributes = {})
  super(attributes)
  @category = attributes[:category] || attributes['category']
  @count = attributes[:count] || attributes['count']
  @sum = attributes[:sum] || attributes['sum']
  @lower_bound = attributes[:lower_bound] || attributes['lower_bound'] || nil
  @upper_bound = attributes[:upper_bound] || attributes['upper_bound'] || nil
end

Instance Attribute Details

#categoryString

Returns:

  • (String)


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

def category
  @category
end

#countInteger

Returns:

  • (Integer)


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

def count
  @count
end

#lower_boundBound

Returns:



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

def lower_bound
  @lower_bound
end

#sumFloat

Returns:

  • (Float)


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

def sum
  @sum
end

#upper_boundBound

Returns:



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

def upper_bound
  @upper_bound
end

Class Method Details

.json_field_mappingsObject

Override field mappings for JSON serialization



39
40
41
42
43
44
45
46
47
# File 'lib/getstream_ruby/generated/models/report_by_histogram_bucket.rb', line 39

def self.json_field_mappings
  {
    category: 'category',
    count: 'count',
    sum: 'sum',
    lower_bound: 'lower_bound',
    upper_bound: 'upper_bound'
  }
end