Class: GetStream::Generated::Models::LimitInfo
- Defined in:
- lib/getstream_ruby/generated/models/limit_info.rb
Instance Attribute Summary collapse
-
#limit ⇒ Integer
The maximum number of calls allowed for the time window.
-
#remaining ⇒ Integer
The number of remaining calls in the current window.
-
#reset ⇒ Integer
The Unix timestamp of the next window.
Class Method Summary collapse
-
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ LimitInfo
constructor
Initialize with attributes.
Methods inherited from BaseModel
#==, #inspect, omit_empty_fields, #to_h, #to_json
Constructor Details
#initialize(attributes = {}) ⇒ LimitInfo
Initialize with attributes
23 24 25 26 27 28 |
# File 'lib/getstream_ruby/generated/models/limit_info.rb', line 23 def initialize(attributes = {}) super(attributes) @limit = attributes[:limit] || attributes['limit'] @remaining = attributes[:remaining] || attributes['remaining'] @reset = attributes[:reset] || attributes['reset'] end |
Instance Attribute Details
#limit ⇒ Integer
Returns The maximum number of calls allowed for the time window.
14 15 16 |
# File 'lib/getstream_ruby/generated/models/limit_info.rb', line 14 def limit @limit end |
#remaining ⇒ Integer
Returns The number of remaining calls in the current window.
17 18 19 |
# File 'lib/getstream_ruby/generated/models/limit_info.rb', line 17 def remaining @remaining end |
#reset ⇒ Integer
Returns The Unix timestamp of the next window.
20 21 22 |
# File 'lib/getstream_ruby/generated/models/limit_info.rb', line 20 def reset @reset end |
Class Method Details
.json_field_mappings ⇒ Object
Override field mappings for JSON serialization
31 32 33 34 35 36 37 |
# File 'lib/getstream_ruby/generated/models/limit_info.rb', line 31 def self.json_field_mappings { limit: 'limit', remaining: 'remaining', reset: 'reset' } end |