Class: OpenAI::Models::Webhooks::WebhookEndpointTestResult

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

Overview

See Also:

  • OpenAI::Resources::Webhooks#test_

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_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_type:, status_code:, success:, webhook_endpoint_id:, object: :"webhook_endpoint.test") ⇒ Object

Parameters:

  • event_type

    The event type sent in the test.

  • status_code

    The HTTP status code returned by the endpoint.

  • success

    Whether the test request completed. Always true for returned results; use status_code to determine the endpoint response.

  • webhook_endpoint_id

    The ID of the webhook endpoint that received the test.

  • object (defaults to: :"webhook_endpoint.test")

    The object type, which is always webhook_endpoint.test.



# File 'lib/openai/models/webhooks/webhook_endpoint_test_result.rb', line 39

Instance Attribute Details

#event_typeString

The event type sent in the test.

Returns:

  • (String)


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

required :event_type, String

#object:"webhook_endpoint.test"

The object type, which is always webhook_endpoint.test.

Returns:

  • (:"webhook_endpoint.test")


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

required :object, const: :"webhook_endpoint.test"

#status_codeInteger

The HTTP status code returned by the endpoint.

Returns:

  • (Integer)


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

required :status_code, Integer

#successBoolean

Whether the test request completed. Always true for returned results; use status_code to determine the endpoint response.

Returns:



31
# File 'lib/openai/models/webhooks/webhook_endpoint_test_result.rb', line 31

required :success, OpenAI::Internal::Type::Boolean

#webhook_endpoint_idString

The ID of the webhook endpoint that received the test.

Returns:

  • (String)


37
# File 'lib/openai/models/webhooks/webhook_endpoint_test_result.rb', line 37

required :webhook_endpoint_id, String

Instance Method Details

#to_hash{

Returns:

  • ({)


49
# File 'sig/openai/models/webhooks/webhook_endpoint_test_result.rbs', line 49

def to_hash: -> {