Module: Anthropic::Models::Beta::Organization::BetaAPIKey::Scope
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/organization/beta_api_key.rb,
sig/anthropic/models/beta/organization/beta_api_key.rbs
Overview
Where the API key belongs: its Workspace
({"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's
real ID even when it is the organization's default Workspace), or the
organization ({"type": "organization"}) for a principal-bound API key that has
no Workspace.
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .values ⇒ Array<Symbol>
- .variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope)
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:) ⇒ Anthropic::Beta::Organization::BetaAPIKeyOrganizationScope .new(type:, workspace_id:) ⇒ Anthropic::Beta::Organization::BetaAPIKeyWorkspaceScope .new(type:, workspace_id:) ⇒ Anthropic::Models::Beta::Organization::BetaAPIKey::scope
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::Beta::Organization::BetaAPIKey::Scope for more details.
197 198 199 200 201 202 203 204 205 206 |
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 197 def self.new(type:, **args) case type.to_sym when :organization Anthropic::Beta::Organization::BetaAPIKeyOrganizationScope.new(**args) when :workspace Anthropic::Beta::Organization::BetaAPIKeyWorkspaceScope.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 176
|
.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaAPIKeyOrganizationScope, Anthropic::Models::Beta::Organization::BetaAPIKeyWorkspaceScope)
|
|
# File 'lib/anthropic/models/beta/organization/beta_api_key.rb', line 180
|