Module: ModerationAPI::Models::WebhookUpdateResponse::EventType

Extended by:
Internal::Type::Enum
Defined in:
lib/moderation_api/models/webhook_update_response.rb,
sig/moderation_api/models/webhook_update_response.rbs

Constant Summary collapse

QUEUE_ITEM_NEW =

Returns:

  • (:QUEUE_ITEM_NEW)
:QUEUE_ITEM_NEW
QUEUE_ITEM_COMPLETED =

Returns:

  • (:QUEUE_ITEM_COMPLETED)
:QUEUE_ITEM_COMPLETED
QUEUE_ITEM_ACTION =

Returns:

  • (:QUEUE_ITEM_ACTION)
:QUEUE_ITEM_ACTION
QUEUE_ITEM_REJECTED =

Returns:

  • (:QUEUE_ITEM_REJECTED)
:QUEUE_ITEM_REJECTED
QUEUE_ITEM_ALLOWED =

Returns:

  • (:QUEUE_ITEM_ALLOWED)
:QUEUE_ITEM_ALLOWED
AUTHOR_BLOCKED =

Returns:

  • (:AUTHOR_BLOCKED)
:AUTHOR_BLOCKED
AUTHOR_UNBLOCKED =

Returns:

  • (:AUTHOR_UNBLOCKED)
:AUTHOR_UNBLOCKED
AUTHOR_SUSPENDED =

Returns:

  • (:AUTHOR_SUSPENDED)
:AUTHOR_SUSPENDED
AUTHOR_UPDATED =

Returns:

  • (:AUTHOR_UPDATED)
:AUTHOR_UPDATED
AUTHOR_TRUST_LEVEL_CHANGED =

Returns:

  • (:AUTHOR_TRUST_LEVEL_CHANGED)
:AUTHOR_TRUST_LEVEL_CHANGED
AUTHOR_ACTION =

Returns:

  • (:AUTHOR_ACTION)
:AUTHOR_ACTION

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, values, values

Methods included from Internal::Util::SorbetRuntimeSupport

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

Methods included from Internal::Type::Converter

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

Instance Method Details

#initialize(id:, created_at:, event_types:, name:, payload_version:, url:, description: nil) ⇒ Object

Some parameter documentations has been truncated, see ModerationAPI::Models::WebhookUpdateResponse for more details.

Parameters:

  • id (String)

    The ID of the webhook.

  • created_at (String)

    The date the webhook was created.

  • event_types (Array<Symbol, ModerationAPI::Models::WebhookUpdateResponse::EventType>)

    Event types this webhook subscribes to. Empty for legacy v1 webhooks, which subs

  • name (String)

    The webhook's name.

  • payload_version (Symbol, ModerationAPI::Models::WebhookUpdateResponse::PayloadVersion)

    Payload envelope version. V2 is the Stripe-style envelope; V1 is the legacy flat

  • url (String)

    The URL we call when a subscribed event occurs.

  • description (String, nil) (defaults to: nil)

    The webhook's description.



73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/moderation_api/models/webhook_update_response.rb', line 73

module EventType
  extend ModerationAPI::Internal::Type::Enum

  QUEUE_ITEM_NEW = :QUEUE_ITEM_NEW
  QUEUE_ITEM_COMPLETED = :QUEUE_ITEM_COMPLETED
  QUEUE_ITEM_ACTION = :QUEUE_ITEM_ACTION
  QUEUE_ITEM_REJECTED = :QUEUE_ITEM_REJECTED
  QUEUE_ITEM_ALLOWED = :QUEUE_ITEM_ALLOWED
  AUTHOR_BLOCKED = :AUTHOR_BLOCKED
  AUTHOR_UNBLOCKED = :AUTHOR_UNBLOCKED
  AUTHOR_SUSPENDED = :AUTHOR_SUSPENDED
  AUTHOR_UPDATED = :AUTHOR_UPDATED
  AUTHOR_TRUST_LEVEL_CHANGED = :AUTHOR_TRUST_LEVEL_CHANGED
  AUTHOR_ACTION = :AUTHOR_ACTION

  # @!method self.values
  #   @return [Array<Symbol>]
end

#self?.values::Array[ModerationAPI::Models::WebhookUpdateResponse::event_type]

Returns:

  • (::Array[ModerationAPI::Models::WebhookUpdateResponse::event_type])


77
# File 'sig/moderation_api/models/webhook_update_response.rbs', line 77

def self?.values: -> ::Array[ModerationAPI::Models::WebhookUpdateResponse::event_type]