Class: ModerationAPI::Models::ActionCreateParams::Webhook

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/moderation_api/models/action_create_params.rb

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(name:, url:, id: nil, description: nil) ⇒ Object

Parameters:

  • 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 the event occurs.

  • id (String) (defaults to: nil)

    ID of an existing webhook or undefined if this is a new webhook.

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

    The webhook’s description



# File 'lib/moderation_api/models/action_create_params.rb', line 206

Instance Attribute Details

#descriptionString?

The webhook’s description

Returns:

  • (String, nil)


204
# File 'lib/moderation_api/models/action_create_params.rb', line 204

optional :description, String, nil?: true

#idString?

ID of an existing webhook or undefined if this is a new webhook.

Returns:

  • (String, nil)


198
# File 'lib/moderation_api/models/action_create_params.rb', line 198

optional :id, String

#nameString

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

Returns:

  • (String)


186
# File 'lib/moderation_api/models/action_create_params.rb', line 186

required :name, String

#urlString

The webhook’s URL. We’ll call this URL when the event occurs.

Returns:

  • (String)


192
# File 'lib/moderation_api/models/action_create_params.rb', line 192

required :url, String