Module: Anthropic::Models::Organization::SpendLimits::SpendLimitIncreaseRequestActor

Extended by:
Internal::Type::Union
Defined in:
lib/anthropic/models/organization/spend_limits/spend_limit_increase_request_actor.rb,
sig/anthropic/models/organization/spend_limits/spend_limit_increase_request_actor.rbs

Overview

Who submitted the increase request.

Defined Under Namespace

Modules: Type

Class Method Summary collapse

Methods included from Internal::Type::Union

==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, inspect, #inspect, meta_info, new_coerce_state, type_info

Class Method Details

.new(type:, deleted:, email_address:, name:, user_id:) ⇒ Anthropic::Organization::SpendLimitUserActor .new(type:, scoped_api_key_id:) ⇒ Anthropic::Organization::SpendLimitScopedAPIKeyActor .new(type:, deleted:, email_address:, name:, user_id:, scoped_api_key_id:) ⇒ Anthropic::Models::Organization::SpendLimits::spend_limit_increase_request_actor

Creates a new instance of the variant class whose type matches the given value, passing the remaining arguments to its constructor.

Some parameter documentations has been truncated, see Anthropic::Models::Organization::SpendLimits::SpendLimitIncreaseRequestActor for more details.

Overloads:

  • .new(type:, deleted:, email_address:, name:, user_id:) ⇒ Anthropic::Organization::SpendLimitUserActor

    Parameters:

    • type: (:user_actor, "user_actor")
    • deleted: (Boolean)
    • email_address: (String, nil)
    • name: (String, nil)
    • user_id: (String)

    Returns:

    • (Anthropic::Organization::SpendLimitUserActor)
  • .new(type:, scoped_api_key_id:) ⇒ Anthropic::Organization::SpendLimitScopedAPIKeyActor

    Parameters:

    • type: (:scoped_api_key_actor, "scoped_api_key_actor")
    • scoped_api_key_id: (String)

    Returns:

    • (Anthropic::Organization::SpendLimitScopedAPIKeyActor)
  • .new(type:, deleted:, email_address:, name:, user_id:, scoped_api_key_id:) ⇒ Anthropic::Models::Organization::SpendLimits::spend_limit_increase_request_actor

    Parameters:

    • type: (Anthropic::Models::Organization::SpendLimits::SpendLimitIncreaseRequestActor::type_, String)
    • deleted: (Boolean)
    • email_address: (String, nil)
    • name: (String, nil)
    • user_id: (String)
    • scoped_api_key_id: (String)

    Returns:

    • (Anthropic::Models::Organization::SpendLimits::spend_limit_increase_request_actor)

Parameters:

  • type (Symbol, Anthropic::Models::Organization::SpendLimits::SpendLimitIncreaseRequestActor::Type, String)
  • args (Hash{Symbol=>Object}) —

    Attributes for the chosen variant.

    @option args [Boolean] :deleted True only when the underlying account has been deleted.

    @option args [String, nil] :email_address The user's email address. Null when the account is unavailable or has been delet

    @option args [String, nil] :name The user's current display name. Null when the account is unavailable, has been

    @option args [String] :user_id Tagged ID of the user.

    @option args [String] :scoped_api_key_id

Returns:

Raises:

  • (ArgumentError)


57
58
59
60
61
62
63
64
65
66
# File 'lib/anthropic/models/organization/spend_limits/spend_limit_increase_request_actor.rb', line 57

def self.new(type:, **args)
  case type.to_sym
  when :user_actor
    Anthropic::Organization::SpendLimitUserActor.new(**args)
  when :scoped_api_key_actor
    Anthropic::Organization::SpendLimitScopedAPIKeyActor.new(**args)
  else
    raise ArgumentError, "unknown type: #{type}"
  end
end

.values ⇒ Array<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/anthropic/models/organization/spend_limits/spend_limit_increase_request_actor.rb', line 27

.variants ⇒ Array(Anthropic::Models::Organization::SpendLimitUserActor, Anthropic::Models::Organization::SpendLimitScopedAPIKeyActor)



# File 'lib/anthropic/models/organization/spend_limits/spend_limit_increase_request_actor.rb', line 31