Class: Hook0::Generated::ApplicationInfoQuotas
- Inherits:
-
Object
- Object
- Hook0::Generated::ApplicationInfoQuotas
- Defined in:
- lib/hook0/generated/models.rb
Overview
The ApplicationInfoQuotas the API declares.
Instance Attribute Summary collapse
-
#days_of_events_retention_limit ⇒ Object
readonly
Returns the value of attribute days_of_events_retention_limit.
-
#events_per_day_limit ⇒ Object
readonly
Returns the value of attribute events_per_day_limit.
Class Method Summary collapse
-
.from_json(value) ⇒ ApplicationInfoQuotas
Read one out of what the API answered.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
(also: #eql?)
Whether that value carries the same members as this one.
-
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
-
#initialize(days_of_events_retention_limit:, events_per_day_limit:) ⇒ ApplicationInfoQuotas
constructor
A new instance of ApplicationInfoQuotas.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(days_of_events_retention_limit:, events_per_day_limit:) ⇒ ApplicationInfoQuotas
Returns a new instance of ApplicationInfoQuotas.
507 508 509 510 511 |
# File 'lib/hook0/generated/models.rb', line 507 def initialize(days_of_events_retention_limit:, events_per_day_limit:) @days_of_events_retention_limit = days_of_events_retention_limit @events_per_day_limit = events_per_day_limit freeze end |
Instance Attribute Details
#days_of_events_retention_limit ⇒ Object (readonly)
Returns the value of attribute days_of_events_retention_limit.
502 503 504 |
# File 'lib/hook0/generated/models.rb', line 502 def days_of_events_retention_limit @days_of_events_retention_limit end |
#events_per_day_limit ⇒ Object (readonly)
Returns the value of attribute events_per_day_limit.
502 503 504 |
# File 'lib/hook0/generated/models.rb', line 502 def events_per_day_limit @events_per_day_limit end |
Class Method Details
.from_json(value) ⇒ ApplicationInfoQuotas
Read one out of what the API answered.
517 518 519 520 521 522 523 |
# File 'lib/hook0/generated/models.rb', line 517 def self.from_json(value) fields = Runtime.as_fields(value, "ApplicationInfoQuotas") new( days_of_events_retention_limit: Runtime.read(fields, "days_of_events_retention_limit", Runtime::INTEGER), events_per_day_limit: Runtime.read(fields, "events_per_day_limit", Runtime::INTEGER) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
539 540 541 |
# File 'lib/hook0/generated/models.rb', line 539 def ==(other) other.is_a?(ApplicationInfoQuotas) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
547 548 549 |
# File 'lib/hook0/generated/models.rb', line 547 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
528 529 530 531 532 533 |
# File 'lib/hook0/generated/models.rb', line 528 def to_h out = {} out["days_of_events_retention_limit"] = @days_of_events_retention_limit out["events_per_day_limit"] = @events_per_day_limit out end |