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

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

Overview

See Also:

  • ModerationAPI::Models::WebhookEvent::AuthorAction::Data#object

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

#author ⇒ ModerationAPI::Models::WebhookEvent::AuthorAction::Data::Object::Author

The author the action was performed on

Parameters:

  • value (ModerationAPI::WebhookEvent::AuthorAction::Data::Object::Author)

Returns:



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

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

#created_at ⇒ Time

ISO 8601 timestamp of when the action was performed

Parameters:

  • value (Time)

Returns:

  • (Time)


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

required :created_at, Time

#id ⇒ String

Moderation action ID

Parameters:

  • value (String)

Returns:

  • (String)


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

required :id, String

#key ⇒ String?

Customer-defined key identifying this action

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :key, String, nil?: true

#name ⇒ String?

Display name of the action

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :name, String, nil?: true

#queue ⇒ ModerationAPI::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 }

#value ⇒ String?

The value passed to the action when it ran

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


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

required :value, String, nil?: true

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


1538
# File 'sig/moderation_api/models/webhook_event.rbs', line 1538

def to_hash: -> {