Class: ModerationAPI::Models::WebhookUpdateParams

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

Overview

See Also:

  • ModerationAPI::Resources::Webhooks#update

Defined Under Namespace

Modules: EventType

Constant Summary

Constants included from Internal::Type::RequestParameters

Internal::Type::RequestParameters::ModerationAPI

Instance Attribute Summary collapse

Attributes included from Internal::Type::RequestParameters

#request_options

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

==, #==, #[], 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

#initializeObject



35
# File 'sig/moderation_api/models/webhook_update_params.rbs', line 35

def initialize: (

Instance Attribute Details

#descriptionString?

The webhook's description

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


20
# File 'lib/moderation_api/models/webhook_update_params.rb', line 20

optional :description, String, nil?: true

#event_typesArray<Symbol, ModerationAPI::Models::WebhookUpdateParams::EventType>?

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



27
28
29
30
31
# File 'lib/moderation_api/models/webhook_update_params.rb', line 27

optional :event_types,
-> {
  ModerationAPI::Internal::Type::ArrayOf[enum: ModerationAPI::WebhookUpdateParams::EventType]
},
api_name: :eventTypes

#idString

The ID of the webhook to update.

Parameters:

  • value (String)

Returns:

  • (String)


14
# File 'lib/moderation_api/models/webhook_update_params.rb', line 14

required :id, String

#nameString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


37
# File 'lib/moderation_api/models/webhook_update_params.rb', line 37

optional :name, String

#urlString?

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

Parameters:

  • (String)

Returns:

  • (String, nil)


43
# File 'lib/moderation_api/models/webhook_update_params.rb', line 43

optional :url, String

Instance Method Details

#to_hash{

Returns:

  • ({)


44
# File 'sig/moderation_api/models/webhook_update_params.rbs', line 44

def to_hash: -> {