Class: Hook0::Generated::ApplicationInfo
- Inherits:
-
Object
- Object
- Hook0::Generated::ApplicationInfo
- Defined in:
- lib/hook0/generated/models.rb
Overview
The ApplicationInfo the API declares.
Instance Attribute Summary collapse
-
#application_id ⇒ Object
readonly
Returns the value of attribute application_id.
-
#consumption ⇒ Object
readonly
Returns the value of attribute consumption.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#onboarding_steps ⇒ Object
readonly
Returns the value of attribute onboarding_steps.
-
#organization_id ⇒ Object
readonly
Returns the value of attribute organization_id.
-
#quotas ⇒ Object
readonly
Returns the value of attribute quotas.
Class Method Summary collapse
-
.from_json(value) ⇒ ApplicationInfo
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(application_id:, consumption:, name:, onboarding_steps:, organization_id:, quotas:) ⇒ ApplicationInfo
constructor
A new instance of ApplicationInfo.
-
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
Constructor Details
#initialize(application_id:, consumption:, name:, onboarding_steps:, organization_id:, quotas:) ⇒ ApplicationInfo
Returns a new instance of ApplicationInfo.
334 335 336 337 338 339 340 341 342 |
# File 'lib/hook0/generated/models.rb', line 334 def initialize(application_id:, consumption:, name:, onboarding_steps:, organization_id:, quotas:) @application_id = application_id @consumption = consumption @name = name @onboarding_steps = onboarding_steps @organization_id = organization_id @quotas = quotas freeze end |
Instance Attribute Details
#application_id ⇒ Object (readonly)
Returns the value of attribute application_id.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def application_id @application_id end |
#consumption ⇒ Object (readonly)
Returns the value of attribute consumption.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def consumption @consumption end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def name @name end |
#onboarding_steps ⇒ Object (readonly)
Returns the value of attribute onboarding_steps.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def onboarding_steps @onboarding_steps end |
#organization_id ⇒ Object (readonly)
Returns the value of attribute organization_id.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def organization_id @organization_id end |
#quotas ⇒ Object (readonly)
Returns the value of attribute quotas.
319 320 321 |
# File 'lib/hook0/generated/models.rb', line 319 def quotas @quotas end |
Class Method Details
.from_json(value) ⇒ ApplicationInfo
Read one out of what the API answered.
348 349 350 351 352 353 354 355 356 357 358 |
# File 'lib/hook0/generated/models.rb', line 348 def self.from_json(value) fields = Runtime.as_fields(value, "ApplicationInfo") new( application_id: Runtime.read(fields, "application_id", Runtime::UUID), consumption: Runtime.read(fields, "consumption", ApplicationInfoConsumption.method(:from_json)), name: Runtime.read(fields, "name", Runtime::TEXT), onboarding_steps: Runtime.read(fields, "onboarding_steps", ApplicationInfoOnboardingSteps.method(:from_json)), organization_id: Runtime.read(fields, "organization_id", Runtime::UUID), quotas: Runtime.read(fields, "quotas", ApplicationInfoQuotas.method(:from_json)) ) end |
Instance Method Details
#==(other) ⇒ Boolean Also known as: eql?
Whether that value carries the same members as this one.
378 379 380 |
# File 'lib/hook0/generated/models.rb', line 378 def ==(other) other.is_a?(ApplicationInfo) && to_h == other.to_h end |
#hash ⇒ Integer
A value two equal instances share, so that either may key a hash.
386 387 388 |
# File 'lib/hook0/generated/models.rb', line 386 def hash to_h.hash end |
#to_h ⇒ Hash{String => Object}
Write one back the way the API reads it.
363 364 365 366 367 368 369 370 371 372 |
# File 'lib/hook0/generated/models.rb', line 363 def to_h out = {} out["application_id"] = @application_id out["consumption"] = @consumption.to_h out["name"] = @name out["onboarding_steps"] = @onboarding_steps.to_h out["organization_id"] = @organization_id out["quotas"] = @quotas.to_h out end |