Module: Anthropic::Models::Organization::APIKey::Scope
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/organization/api_key.rb,
sig/anthropic/models/organization/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::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope
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::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope)
Instance Method Summary collapse
Methods included from Internal::Type::Union
==, ===, coerce, derefed_variants, dump, hash, inspect, to_sorbet_type, variants
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:, **args) ⇒ Anthropic::Models::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope
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::APIKey::Scope for more details.
196 197 198 199 200 201 202 203 204 205 |
# File 'lib/anthropic/models/organization/api_key.rb', line 196 def self.new(type:, **args) case type.to_sym when :organization Anthropic::Organization::APIKeyOrganizationScope.new(**args) when :workspace Anthropic::Organization::APIKeyWorkspaceScope.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/organization/api_key.rb', line 175
|
.variants ⇒ Array(Anthropic::Models::Organization::APIKeyOrganizationScope, Anthropic::Models::Organization::APIKeyWorkspaceScope)
|
|
# File 'lib/anthropic/models/organization/api_key.rb', line 179
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Organization::APIKey::scope]
120 |
# File 'sig/anthropic/models/organization/api_key.rbs', line 120
def self?.variants: -> ::Array[Anthropic::Models::Organization::APIKey::scope]
|