Class: Anthropic::Models::Beta::BetaWebhookEvent

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_webhook_event.rb,
sig/anthropic/models/beta/beta_webhook_event.rbs

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 ⇒ BetaWebhookEvent

Returns a new instance of BetaWebhookEvent.

Parameters:

  • id: (String)
  • created_at: (Time)
  • data: (Anthropic::Models::Beta::beta_webhook_event_data)
  • type: (:event)


23
24
25
26
27
28
# File 'sig/anthropic/models/beta/beta_webhook_event.rbs', line 23

def initialize: (
  id: String,
  created_at: Time,
  data: Anthropic::Models::Beta::beta_webhook_event_data,
  ?type: :event
) -> void

Instance Attribute Details

#created_at ⇒ Time

RFC 3339 timestamp when the event occurred.

Parameters:

  • value (Time)

Returns:

  • (Time)


17
# File 'lib/anthropic/models/beta/beta_webhook_event.rb', line 17

required :created_at, Time

#data ⇒ Anthropic::Models::Beta::BetaWebhookSessionCreatedEventData, ...

Parameters:

  • value (Anthropic::Models::Beta::beta_webhook_event_data)

Returns:



22
# File 'lib/anthropic/models/beta/beta_webhook_event.rb', line 22

required :data, union: -> { Anthropic::Beta::BetaWebhookEventData }

#id ⇒ String

Unique event identifier for idempotency.

Parameters:

  • value (String)

Returns:

  • (String)


11
# File 'lib/anthropic/models/beta/beta_webhook_event.rb', line 11

required :id, String

#type ⇒ Symbol, :event

Object type. Always event for webhook payloads.

Parameters:

  • value (:event)

Returns:

  • (Symbol, :event)


28
# File 'lib/anthropic/models/beta/beta_webhook_event.rb', line 28

required :type, const: :event

Instance Method Details

#to_hash ⇒ { id: String, created_at: Time, data: Anthropic::Models::Beta::beta_webhook_event_data, type: :event }

Returns:

  • ({ id: String, created_at: Time, data: Anthropic::Models::Beta::beta_webhook_event_data, type: :event })


30
31
32
33
34
35
# File 'sig/anthropic/models/beta/beta_webhook_event.rbs', line 30

def to_hash: -> {
  id: String,
  created_at: Time,
  data: Anthropic::Models::Beta::beta_webhook_event_data,
  type: :event
}