Module: ModerationAPI::Models::WebhookCreateParams::EventType

Extended by:
Internal::Type::Enum
Defined in:
lib/moderation_api/models/webhook_create_params.rb,
sig/moderation_api/models/webhook_create_params.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

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Internal::Type::Enum

==, ===, coerce, dump, hash, inspect, to_sorbet_type, 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

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/moderation_api/models/webhook_create_params.rb', line 68

Instance Method Details

#initialize(event_types:, name:, url:, description: nil, request_options: {}) ⇒ Object

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

Parameters:

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

    Event types this webhook subscribes to. One webhook URL receives all events you

  • name (String)

    The webhook's name, used to identify it in the dashboard

  • url (String)

    The webhook's URL. We'll call this URL when an event occurs.

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

    The webhook's description

  • request_options (ModerationAPI::RequestOptions, Hash{Symbol=>Object}) (defaults to: {})


53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# File 'lib/moderation_api/models/webhook_create_params.rb', line 53

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::WebhookCreateParams::event_type]

Returns:

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


68
# File 'sig/moderation_api/models/webhook_create_params.rbs', line 68

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