Class: Moonbase::Models::Endpoint

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moonbase/models/endpoint.rb

Overview

Defined Under Namespace

Modules: Status

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(id:, created_at:, status:, subscriptions:, updated_at:, url:, secret: nil, type: :webhook_endpoint) ⇒ Object

Some parameter documentations has been truncated, see Moonbase::Models::Endpoint for more details.

A Webhook Endpoint is an HTTP endpoint that receives webhooks. You can configure which events are sent to each endpoint by creating ‘WebhookSubscription` objects.

Parameters:

  • id (String)

    Unique identifier for the object.

  • created_at (Time)

    Time at which the object was created, as an ISO 8601 timestamp in UTC.

  • status (Symbol, Moonbase::Models::Endpoint::Status)

    Indicates whether the endpoint is enabled.

  • subscriptions (Array<Moonbase::Models::Subscription>)

    An array of ‘WebhookSubscription` objects representing the events this endpoint

  • updated_at (Time)

    Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

  • url (String)

    The HTTPS URL where webhook events will be sent.

  • secret (String) (defaults to: nil)

    The signing secret used to verify webhook authenticity. This value is only shown

  • type (Symbol, :webhook_endpoint) (defaults to: :webhook_endpoint)

    String representing the object’s type. Always ‘webhook_endpoint` for this object



# File 'lib/moonbase/models/endpoint.rb', line 58

Instance Attribute Details

#created_atTime

Time at which the object was created, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


17
# File 'lib/moonbase/models/endpoint.rb', line 17

required :created_at, Time

#idString

Unique identifier for the object.

Returns:

  • (String)


11
# File 'lib/moonbase/models/endpoint.rb', line 11

required :id, String

#secretString?

The signing secret used to verify webhook authenticity. This value is only shown when creating the endpoint and starts with ‘whsec_`.

Returns:

  • (String, nil)


56
# File 'lib/moonbase/models/endpoint.rb', line 56

optional :secret, String

#statusSymbol, Moonbase::Models::Endpoint::Status

Indicates whether the endpoint is enabled.



23
# File 'lib/moonbase/models/endpoint.rb', line 23

required :status, enum: -> { Moonbase::Endpoint::Status }

#subscriptionsArray<Moonbase::Models::Subscription>

An array of ‘WebhookSubscription` objects representing the events this endpoint will receive.

Returns:



30
# File 'lib/moonbase/models/endpoint.rb', line 30

required :subscriptions, -> { Moonbase::Internal::Type::ArrayOf[Moonbase::Subscription] }

#typeSymbol, :webhook_endpoint

String representing the object’s type. Always ‘webhook_endpoint` for this object.

Returns:

  • (Symbol, :webhook_endpoint)


37
# File 'lib/moonbase/models/endpoint.rb', line 37

required :type, const: :webhook_endpoint

#updated_atTime

Time at which the object was last updated, as an ISO 8601 timestamp in UTC.

Returns:

  • (Time)


43
# File 'lib/moonbase/models/endpoint.rb', line 43

required :updated_at, Time

#urlString

The HTTPS URL where webhook events will be sent.

Returns:

  • (String)


49
# File 'lib/moonbase/models/endpoint.rb', line 49

required :url, String