Module: Anthropic::Models::Beta::Organization::BetaSpendSummary::Source
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/organization/beta_spend_summary.rb,
sig/anthropic/models/beta/organization/beta_spend_summary.rbs
Overview
Defined Under Namespace
Modules: Type
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, ...
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::BetaSpendLimitUserScope, Anthropic::Models::Beta::Organization::BetaSpendLimitSeatTierScope, Anthropic::Models::Beta::Organization::BetaSpendLimitRBACGroupScope, Anthropic::Models::Beta::Organization::BetaSpendLimitOrganizationServiceScope, Anthropic::Models::Beta::Organization::BetaSpendLimitOrganizationScope, Anthropic::Models::Beta::Organization::BetaSpendLimitWorkspaceScope, Anthropic::Models::Beta::Organization::BetaSpendLimitUsageTierScope)
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::Beta::Organization::BetaSpendLimitUserScope .new(type:, seat_tier:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitSeatTierScope .new(type:, rbac_group_id:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitRBACGroupScope .new(type:, service:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitOrganizationServiceScope .new(type:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitOrganizationScope .new(type:, workspace_id:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitWorkspaceScope .new(type:) ⇒ Anthropic::Beta::Organization::BetaSpendLimitUsageTierScope .new(type:, user_id:, seat_tier:, rbac_group_id:, service:, workspace_id:) ⇒ Anthropic::Models::Beta::Organization::BetaSpendSummary::source
Creates a new instance of the variant class whose type matches the given
value, passing the remaining arguments to its constructor.
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 |
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 296 def self.new(type:, **args) case type.to_sym when :user Anthropic::Beta::Organization::BetaSpendLimitUserScope.new(**args) when :seat_tier Anthropic::Beta::Organization::BetaSpendLimitSeatTierScope.new(**args) when :rbac_group Anthropic::Beta::Organization::BetaSpendLimitRBACGroupScope.new(**args) when :organization_service Anthropic::Beta::Organization::BetaSpendLimitOrganizationServiceScope.new(**args) when :organization Anthropic::Beta::Organization::BetaSpendLimitOrganizationScope.new(**args) when :workspace Anthropic::Beta::Organization::BetaSpendLimitWorkspaceScope.new(**args) when :usage_tier Anthropic::Beta::Organization::BetaSpendLimitUsageTierScope.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.values ⇒ Array<Symbol>
|
|
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 270
|
.variants ⇒ Array(Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, Anthropic::Models::Beta::Organization::BetaSpendLimitSeatTierScope, Anthropic::Models::Beta::Organization::BetaSpendLimitRBACGroupScope, Anthropic::Models::Beta::Organization::BetaSpendLimitOrganizationServiceScope, Anthropic::Models::Beta::Organization::BetaSpendLimitOrganizationScope, Anthropic::Models::Beta::Organization::BetaSpendLimitWorkspaceScope, Anthropic::Models::Beta::Organization::BetaSpendLimitUsageTierScope)
|
|
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 274
|