Class: ModerationAPI::Models::WebhookEvent::AuthorAction::Data::Object

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

Overview

See Also:

Defined Under Namespace

Classes: Author, Queue

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(level:, manual:) ⇒ Object

Parameters:

  • level (Float)

    Author trust level (-1, 0, 1, 2, 3, or 4)

  • manual (Boolean)

    True if the trust level was set manually by a moderator



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

Instance Attribute Details

#authorModerationAPI::Models::WebhookEvent::AuthorAction::Data::Object::Author

The author the action was performed on



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

required :author, -> { ModerationAPI::WebhookEvent::AuthorAction::Data::Object::Author }

#created_atTime

ISO 8601 timestamp of when the action was performed

Returns:

  • (Time)


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

required :created_at, Time

#idString

Moderation action ID

Returns:

  • (String)


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

required :id, String

#keyString?

Customer-defined key identifying this action

Returns:

  • (String, nil)


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

required :key, String, nil?: true

#nameString?

Display name of the action

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#queueModerationAPI::Models::WebhookEvent::AuthorAction::Data::Object::Queue?

The queue the item belongs to, if any



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

optional :queue, -> { ModerationAPI::WebhookEvent::AuthorAction::Data::Object::Queue }

#valueString?

The value passed to the action when it ran

Returns:

  • (String, nil)


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

required :value, String, nil?: true