Class: OpenAI::Models::Webhooks::WebhookEndpoint

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/openai/models/webhooks/webhook_endpoint.rb,
sig/openai/models/webhooks/webhook_endpoint.rbs

Overview

See Also:

  • OpenAI::Resources::Webhooks#retrieve

Instance Attribute Summary collapse

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], #_request_id, #_set_last_response, coerce, #deconstruct_keys, #deep_to_h, dump, #encode_with, 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, coerce_cached, coerce_with_error, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, resolve_type, 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:, event_types:, name:, signing_secret_hint:, url:, updated_at: nil, object: :webhook_endpoint) ⇒ WebhookEndpoint

Returns a new instance of WebhookEndpoint.

Parameters:

  • id —

    The unique ID of the webhook endpoint.

  • created_at —

    The Unix timestamp when the endpoint was created.

  • event_types —

    The event types that trigger deliveries to this endpoint.

  • name —

    The human-readable name of the endpoint.

  • signing_secret_hint —

    A masked hint for the endpoint's signing secret.

  • url —

    The HTTPS URL that receives webhook deliveries.

  • updated_at (defaults to: nil) —

    The Unix timestamp of the last endpoint configuration or signing-secret change. Initialized at creation; tests and unchanged updates do not advance it.

  • object (defaults to: :webhook_endpoint) —

    The object type, which is always webhook_endpoint.

  • id: (String)
  • created_at: (Integer)
  • event_types: (::Array[String])
  • name: (String)
  • signing_secret_hint: (String, nil)
  • url: (String)
  • updated_at: (Integer) (defaults to: nil)
  • object: (:webhook_endpoint) (defaults to: :webhook_endpoint)


# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 57

Instance Attribute Details

#created_at ⇒ Integer

The Unix timestamp when the endpoint was created.

Returns:

  • (Integer)


18
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 18

required :created_at, Integer

#event_types ⇒ ::Array[String]

The event types that trigger deliveries to this endpoint.

Returns:

  • (::Array[String])


24
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 24

required :event_types, OpenAI::Internal::Type::ArrayOf[String]

#id ⇒ String

The unique ID of the webhook endpoint.

Returns:

  • (String)


12
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 12

required :id, String

#name ⇒ String

The human-readable name of the endpoint.

Returns:

  • (String)


30
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 30

required :name, String

#object ⇒ :webhook_endpoint

The object type, which is always webhook_endpoint.

Returns:

  • (:webhook_endpoint)


36
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 36

required :object, const: :webhook_endpoint

#signing_secret_hint ⇒ String?

A masked hint for the endpoint's signing secret.

Returns:

  • (String, nil)


42
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 42

required :signing_secret_hint, String, nil?: true

#updated_at ⇒ Integer?

The Unix timestamp of the last endpoint configuration or signing-secret change. Initialized at creation; tests and unchanged updates do not advance it.

Returns:

  • (Integer, nil)


55
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 55

optional :updated_at, Integer

#url ⇒ String

The HTTPS URL that receives webhook deliveries.

Returns:

  • (String)


48
# File 'lib/openai/models/webhooks/webhook_endpoint.rb', line 48

required :url, String

Instance Method Details

#to_hash ⇒ { id: String, created_at: Integer, event_types: ::Array[String], name: String, ?object: :webhook_endpoint, signing_secret_hint: String?, url: String, ?updated_at: Integer }

Returns:

  • ({ id: String, created_at: Integer, event_types: ::Array[String], name: String, ?object: :webhook_endpoint, signing_secret_hint: String?, url: String, ?updated_at: Integer })


74
75
76
77
78
79
80
81
82
83
# File 'sig/openai/models/webhooks/webhook_endpoint.rbs', line 74

def to_hash: -> {
  id: String,
  created_at: Integer,
  event_types: ::Array[String],
  name: String,
  ?object: :webhook_endpoint,
  signing_secret_hint: String?,
  url: String,
  ?updated_at: Integer
}