Class: ModerationAPI::Models::WebhookEvent::AuthorSuspended::Data::Object::Author::TrustLevel

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::AuthorSuspended::Data::Object::Author#trust_level

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

#initializeTrustLevel

Returns a new instance of TrustLevel.

Parameters:

  • level: (Float)
  • manual: (Boolean)


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

def initialize: (level: Float, manual: bool) -> void

Instance Attribute Details

#levelFloat

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

Parameters:

  • value (Float)

Returns:

  • (Float)


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

required :level, Float

#manualBoolean

True if the trust level was set manually by a moderator

Parameters:

  • value (Boolean)

Returns:

  • (Boolean)


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

required :manual, ModerationAPI::Internal::Type::Boolean

Instance Method Details

#to_hash{ level: Float, manual: bool }

Returns:

  • ({ level: Float, manual: bool })


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

def to_hash: -> { level: Float, manual: bool }