Class: Anthropic::Models::UserProfileEnforcementActionBan

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

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(id:, action:, expires_at:, opened_at:, reason:, type: :ban) ⇒ UserProfileEnforcementActionBan

Anthropic has stopped serving the end user where the ban applies and does not plan to serve them there again.

Some parameter documentations has been truncated, see Anthropic::Models::UserProfileEnforcementActionBan for more details.

Parameters:

  • id (String) —

    The action's ID (enac_...), stable while the action is open.

  • action (Symbol, Anthropic::Models::UserProfileEnforcementActionNextStep, nil) —

    Always null: the end user cannot clear a ban.

  • expires_at (Time, nil) —

    Always null: a ban has no end date.

  • opened_at (Time) —

    When Anthropic opened the action, in RFC 3339 format.

  • reason (Symbol, Anthropic::Models::UserProfileEnforcementActionReason) —

    Why Anthropic placed the limit: unsupported_region, fraud_or_abuse,

  • type (Symbol, :ban) (defaults to: :ban)
  • id: (String)
  • action: (Anthropic::Models::user_profile_enforcement_action_next_step, nil)
  • expires_at: (Time, nil)
  • opened_at: (Time)
  • reason: (Anthropic::Models::user_profile_enforcement_action_reason)
  • type: (:ban) (defaults to: :ban)


# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 42

Instance Attribute Details

#action ⇒ Symbol, ...

Always null: the end user cannot clear a ban.

Parameters:

  • value (Anthropic::Models::user_profile_enforcement_action_next_step, nil)

Returns:



16
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 16

required :action, enum: -> { Anthropic::UserProfileEnforcementActionNextStep }, nil?: true

#expires_at ⇒ Time?

Always null: a ban has no end date.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


22
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 22

required :expires_at, Time, nil?: true

#id ⇒ String

The action's ID (enac_...), stable while the action is open.

Parameters:

  • value (String)

Returns:

  • (String)


10
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 10

required :id, String

#opened_at ⇒ Time

When Anthropic opened the action, in RFC 3339 format.

Parameters:

  • value (Time)

Returns:

  • (Time)


28
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 28

required :opened_at, Time

#reason ⇒ Symbol, Anthropic::Models::UserProfileEnforcementActionReason

Why Anthropic placed the limit: unsupported_region, fraud_or_abuse, high_harm, usage_policy_violation, account_compromise or unspecified.

Parameters:

  • value (Anthropic::Models::user_profile_enforcement_action_reason)

Returns:



35
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 35

required :reason, enum: -> { Anthropic::UserProfileEnforcementActionReason }

#type ⇒ Symbol, :ban

Parameters:

  • value (:ban)

Returns:

  • (Symbol, :ban)


40
# File 'lib/anthropic/models/user_profile_enforcement_action_ban.rb', line 40

required :type, const: :ban

Instance Method Details

#to_hash ⇒ { id: String, action: Anthropic::Models::user_profile_enforcement_action_next_step?, expires_at: Time?, opened_at: Time, reason: Anthropic::Models::user_profile_enforcement_action_reason, type: :ban }

Returns:

  • ({ id: String, action: Anthropic::Models::user_profile_enforcement_action_next_step?, expires_at: Time?, opened_at: Time, reason: Anthropic::Models::user_profile_enforcement_action_reason, type: :ban })


35
36
37
38
39
40
41
42
# File 'sig/anthropic/models/user_profile_enforcement_action_ban.rbs', line 35

def to_hash: -> {
  id: String,
  action: Anthropic::Models::user_profile_enforcement_action_next_step?,
  expires_at: Time?,
  opened_at: Time,
  reason: Anthropic::Models::user_profile_enforcement_action_reason,
  type: :ban
}