Module: Anthropic::Models::Organization::SpendSummary::Scope
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/organization/spend_summary.rb,
sig/anthropic/models/organization/spend_summary.rbs
Overview
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Organization::SpendLimitUserScope, ...
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::SpendLimitUserScope, Anthropic::Models::Organization::SpendLimitSeatTierScope, Anthropic::Models::Organization::SpendLimitRBACGroupScope, Anthropic::Models::Organization::SpendLimitOrganizationServiceScope, Anthropic::Models::Organization::SpendLimitOrganizationScope, Anthropic::Models::Organization::SpendLimitWorkspaceScope, Anthropic::Models::Organization::SpendLimitUsageTierScope)
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:, user_id:) ⇒ Anthropic::Organization::SpendLimitUserScope .new(type:, seat_tier:) ⇒ Anthropic::Organization::SpendLimitSeatTierScope .new(type:, rbac_group_id:) ⇒ Anthropic::Organization::SpendLimitRBACGroupScope .new(type:, service:) ⇒ Anthropic::Organization::SpendLimitOrganizationServiceScope .new(type:) ⇒ Anthropic::Organization::SpendLimitOrganizationScope .new(type:, workspace_id:) ⇒ Anthropic::Organization::SpendLimitWorkspaceScope .new(type:) ⇒ Anthropic::Organization::SpendLimitUsageTierScope .new(type:, user_id:, seat_tier:, rbac_group_id:, service:, workspace_id:) ⇒ Anthropic::Models::Organization::SpendSummary::scope
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 |
# File 'lib/anthropic/models/organization/spend_summary.rb', line 206 def self.new(type:, **args) case type.to_sym when :user Anthropic::Organization::SpendLimitUserScope.new(**args) when :seat_tier Anthropic::Organization::SpendLimitSeatTierScope.new(**args) when :rbac_group Anthropic::Organization::SpendLimitRBACGroupScope.new(**args) when :organization_service Anthropic::Organization::SpendLimitOrganizationServiceScope.new(**args) when :organization Anthropic::Organization::SpendLimitOrganizationScope.new(**args) when :workspace Anthropic::Organization::SpendLimitWorkspaceScope.new(**args) when :usage_tier Anthropic::Organization::SpendLimitUsageTierScope.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/organization/spend_summary.rb', line 180
|
.variants ⇒ Array(Anthropic::Models::Organization::SpendLimitUserScope, Anthropic::Models::Organization::SpendLimitSeatTierScope, Anthropic::Models::Organization::SpendLimitRBACGroupScope, Anthropic::Models::Organization::SpendLimitOrganizationServiceScope, Anthropic::Models::Organization::SpendLimitOrganizationScope, Anthropic::Models::Organization::SpendLimitWorkspaceScope, Anthropic::Models::Organization::SpendLimitUsageTierScope)
|
|
# File 'lib/anthropic/models/organization/spend_summary.rb', line 184
|