Class: Anthropic::Models::UserProfileEnforcementActionRestriction

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/user_profile_enforcement_action_restriction.rb,
sig/anthropic/models/user_profile_enforcement_action_restriction.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: :restriction) ⇒ UserProfileEnforcementActionRestriction

Anthropic has limited how it serves the end user until the action is resolved. The end user may still be served in part.

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

Parameters:

  • id (String) —

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

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

    The next step on the action: verify or null. verify: the end user can clea

  • expires_at (Time, nil) —

    When the action ends on its own, in RFC 3339 format; it stops showing once this

  • 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, :restriction) (defaults to: :restriction)
  • 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: (:restriction) (defaults to: :restriction)


# File 'lib/anthropic/models/user_profile_enforcement_action_restriction.rb', line 47

Instance Attribute Details

#action ⇒ Symbol, ...

The next step on the action: verify or null. verify: the end user can clear it now by passing an identity check. null: there is nothing the end user can do now to clear it, including while Anthropic reviews an identity check the end user submitted.

Parameters:

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

Returns:



19
# File 'lib/anthropic/models/user_profile_enforcement_action_restriction.rb', line 19

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

#expires_at ⇒ Time?

When the action ends on its own, in RFC 3339 format; it stops showing once this time has passed. null when it has no end date, and always null when reason is account_compromise.

Parameters:

  • value (Time, nil)

Returns:

  • (Time, nil)


27
# File 'lib/anthropic/models/user_profile_enforcement_action_restriction.rb', line 27

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_restriction.rb', line 10

required :id, String

#opened_at ⇒ Time

When Anthropic opened the action, in RFC 3339 format.

Parameters:

  • value (Time)

Returns:

  • (Time)


33
# File 'lib/anthropic/models/user_profile_enforcement_action_restriction.rb', line 33

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:



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

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

#type ⇒ Symbol, :restriction

Parameters:

  • value (:restriction)

Returns:

  • (Symbol, :restriction)


45
# File 'lib/anthropic/models/user_profile_enforcement_action_restriction.rb', line 45

required :type, const: :restriction

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: :restriction }

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: :restriction })


35
36
37
38
39
40
41
42
# File 'sig/anthropic/models/user_profile_enforcement_action_restriction.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: :restriction
}