Class: ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction

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

Overview

See Also:

Defined Under Namespace

Modules: Action, Behavior

Instance Attribute Summary collapse

Class Method 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(action:, behavior: nil, reason: nil, source: nil) ⇒ Object

Some parameter documentations has been truncated, see ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction for more details.

A recommendation from your own client-side flagging.

Parameters:



# File 'lib/moderation_api/models/webhook_event.rb', line 3933

Instance Attribute Details

#actionSymbol, ModerationAPI::Models::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::Action

Your recommendation for the content: allow, review, or reject.



3910
3911
# File 'lib/moderation_api/models/webhook_event.rb', line 3910

required :action,
enum: -> { ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::Action }

#behaviorSymbol, ...

How your recommendation combines with ours. Defaults to ‘escalate’, which only applies it when stricter than ours; ‘override’ replaces ours outright.



3918
3919
# File 'lib/moderation_api/models/webhook_event.rb', line 3918

optional :behavior,
enum: -> { ModerationAPI::WebhookEvent::QueueItemAction::Data::Object::Item::ClientAction::Behavior }

#reasonString?

A human-readable explanation for your recommendation.

Returns:

  • (String, nil)


3925
# File 'lib/moderation_api/models/webhook_event.rb', line 3925

optional :reason, String

#sourceString?

Where your recommendation came from, e.g. “banned-ip”.

Returns:

  • (String, nil)


3931
# File 'lib/moderation_api/models/webhook_event.rb', line 3931

optional :source, String

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/moderation_api/models/webhook_event.rb', line 3958