Class: Hook0::Generated::OrganizationInfoOnboardingSteps

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

Overview

The OrganizationInfoOnboardingSteps the API declares.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(application:, event:, event_type:, subscription:) ⇒ OrganizationInfoOnboardingSteps

Returns a new instance of OrganizationInfoOnboardingSteps.

Parameters:

  • application (String)

    carries application, one of OrganizationInfoOnboardingStepsApplication::VALUES.

  • event (String)

    carries event, one of OrganizationInfoOnboardingStepsEvent::VALUES.

  • event_type (String)

    carries event_type, one of OrganizationInfoOnboardingStepsEventType::VALUES.

  • subscription (String)

    carries subscription, one of OrganizationInfoOnboardingStepsSubscription::VALUES.



1670
1671
1672
1673
1674
1675
1676
# File 'lib/hook0/generated/models.rb', line 1670

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

Instance Attribute Details

#applicationObject (readonly)

Returns the value of attribute application.



1660
1661
1662
# File 'lib/hook0/generated/models.rb', line 1660

def application
  @application
end

#eventObject (readonly)

Returns the value of attribute event.



1660
1661
1662
# File 'lib/hook0/generated/models.rb', line 1660

def event
  @event
end

#event_typeObject (readonly)

Returns the value of attribute event_type.



1660
1661
1662
# File 'lib/hook0/generated/models.rb', line 1660

def event_type
  @event_type
end

#subscriptionObject (readonly)

Returns the value of attribute subscription.



1660
1661
1662
# File 'lib/hook0/generated/models.rb', line 1660

def subscription
  @subscription
end

Class Method Details

.from_json(value) ⇒ OrganizationInfoOnboardingSteps

Read one out of what the API answered.

Parameters:

  • value (Object)

    the JSON document the API answered

Returns:



1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
# File 'lib/hook0/generated/models.rb', line 1682

def self.from_json(value)
  fields = Runtime.as_fields(value, "OrganizationInfoOnboardingSteps")
  new(
    application: Runtime.read(
      fields,
      "application",
      Runtime.member_of(OrganizationInfoOnboardingStepsApplication)
    ),
    event: Runtime.read(fields, "event", Runtime.member_of(OrganizationInfoOnboardingStepsEvent)),
    event_type: Runtime.read(fields, "event_type", Runtime.member_of(OrganizationInfoOnboardingStepsEventType)),
    subscription: Runtime.read(
      fields,
      "subscription",
      Runtime.member_of(OrganizationInfoOnboardingStepsSubscription)
    )
  )
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)


1716
1717
1718
# File 'lib/hook0/generated/models.rb', line 1716

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

#hashInteger

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

Returns:

  • (Integer)


1724
1725
1726
# File 'lib/hook0/generated/models.rb', line 1724

def hash
  to_h.hash
end

#to_hHash{String => Object}

Write one back the way the API reads it.

Returns:

  • (Hash{String => Object})


1703
1704
1705
1706
1707
1708
1709
1710
# File 'lib/hook0/generated/models.rb', line 1703

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