Class: OpenAI::Models::Webhooks::WebhookCreateParams

Inherits:
Internal::Type::BaseModel show all
Extended by:
Internal::Type::RequestParameters::Converter
Includes:
Internal::Type::RequestParameters
Defined in:
lib/openai/models/webhooks/webhook_create_params.rb,
sig/openai/models/webhooks/webhook_create_params.rbs

Overview

See Also:

  • OpenAI::Resources::Webhooks#create

Defined Under Namespace

Modules: EventType

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

Attributes inherited from Internal::Type::BaseModel

#last_response

Instance Method Summary collapse

Methods included from Internal::Type::RequestParameters::Converter

dump_request

Methods included from Internal::Type::RequestParameters

included

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_with_error, 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(event_types:, name:, url:, request_options: {}) ⇒ Object

Parameters:

  • event_types

    The event types that trigger deliveries to this endpoint.

  • name

    A human-readable name for the webhook endpoint.

  • url

    The HTTPS URL that receives webhook deliveries.



# File 'lib/openai/models/webhooks/webhook_create_params.rb', line 32

Instance Attribute Details

#event_types::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type]

The event types that trigger deliveries to this endpoint.

Returns:

  • (::Array[OpenAI::Models::Webhooks::WebhookCreateParams::event_type])


15
16
17
18
# File 'lib/openai/models/webhooks/webhook_create_params.rb', line 15

required(
  :event_types,
  -> { OpenAI::Internal::Type::ArrayOf[enum: OpenAI::Webhooks::WebhookCreateParams::EventType] }
)

#nameString

A human-readable name for the webhook endpoint.

Returns:

  • (String)


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

required :name, String

#urlString

The HTTPS URL that receives webhook deliveries.

Returns:

  • (String)


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

required :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


38
# File 'sig/openai/models/webhooks/webhook_create_params.rbs', line 38

def to_hash: -> {