Class: Hook0::Generated::ApplicationInfoOnboardingSteps

Inherits:
Object
  • Object
show all
Defined in:
lib/hook0/generated/models.rb

Overview

The ApplicationInfoOnboardingSteps the API declares.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(event:, event_type:, subscription:) ⇒ ApplicationInfoOnboardingSteps

Returns a new instance of ApplicationInfoOnboardingSteps.

Parameters:

  • event (String)

    carries event, one of ApplicationInfoOnboardingStepsEvent::VALUES.

  • event_type (String)

    carries event_type, one of ApplicationInfoOnboardingStepsEventType::VALUES.

  • subscription (String)

    carries subscription, one of ApplicationInfoOnboardingStepsSubscription::VALUES.



448
449
450
451
452
453
# File 'lib/hook0/generated/models.rb', line 448

def initialize(event:, event_type:, subscription:)
  @event = event
  @event_type = event_type
  @subscription = subscription
  freeze
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



440
441
442
# File 'lib/hook0/generated/models.rb', line 440

def event
  @event
end

#event_typeObject (readonly)

Returns the value of attribute event_type.



440
441
442
# File 'lib/hook0/generated/models.rb', line 440

def event_type
  @event_type
end

#subscriptionObject (readonly)

Returns the value of attribute subscription.



440
441
442
# File 'lib/hook0/generated/models.rb', line 440

def subscription
  @subscription
end

Class Method Details

.from_json(value) ⇒ ApplicationInfoOnboardingSteps

Read one out of what the API answered.

Parameters:

  • value (Object)

    the JSON document the API answered

Returns:



459
460
461
462
463
464
465
466
467
468
469
470
# File 'lib/hook0/generated/models.rb', line 459

def self.from_json(value)
  fields = Runtime.as_fields(value, "ApplicationInfoOnboardingSteps")
  new(
    event: Runtime.read(fields, "event", Runtime.member_of(ApplicationInfoOnboardingStepsEvent)),
    event_type: Runtime.read(fields, "event_type", Runtime.member_of(ApplicationInfoOnboardingStepsEventType)),
    subscription: Runtime.read(
      fields,
      "subscription",
      Runtime.member_of(ApplicationInfoOnboardingStepsSubscription)
    )
  )
end

Instance Method Details

#==(other) ⇒ Boolean Also known as: eql?

Whether that value carries the same members as this one.

Parameters:

  • other (Object)

Returns:

  • (Boolean)


487
488
489
# File 'lib/hook0/generated/models.rb', line 487

def ==(other)
  other.is_a?(ApplicationInfoOnboardingSteps) && to_h == other.to_h
end

#hashInteger

A value two equal instances share, so that either may key a hash.

Returns:

  • (Integer)


495
496
497
# File 'lib/hook0/generated/models.rb', line 495

def hash
  to_h.hash
end

#to_hHash{String => Object}

Write one back the way the API reads it.

Returns:

  • (Hash{String => Object})


475
476
477
478
479
480
481
# File 'lib/hook0/generated/models.rb', line 475

def to_h
  out = {}
  out["event"] = @event
  out["event_type"] = @event_type
  out["subscription"] = @subscription
  out
end