Module: Anthropic::Models::Beta::BetaFallbackCreditUsage::Status
- Extended by:
- Internal::Type::Union
- Defined in:
- lib/anthropic/models/beta/beta_fallback_credit_usage.rb,
sig/anthropic/models/beta/beta_fallback_credit_usage.rbs
Overview
Whether the fallback-credit reprice was applied to this response's billing.
A union discriminated on type. redeemed: the retry is billed as if the
conversation had been on the retry model all along — including when the
resulting shift is zero because there was nothing to move. not_applied: no
reprice was applied; the arm's reason says why.
Class Method Summary collapse
-
.new(type:, **args) ⇒ Anthropic::Models::Beta::BetaFallbackCreditRedeemed, Anthropic::Models::Beta::BetaFallbackCreditNotApplied
Creates a new instance of the variant class whose
typematches the given value, passing the remaining arguments to its constructor. - .variants ⇒ Array(Anthropic::Models::Beta::BetaFallbackCreditRedeemed, Anthropic::Models::Beta::BetaFallbackCreditNotApplied)
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::Beta::BetaFallbackCreditRedeemed, Anthropic::Models::Beta::BetaFallbackCreditNotApplied
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::BetaFallbackCreditUsage::Status for more details.
65 66 67 68 69 70 71 72 73 74 |
# File 'lib/anthropic/models/beta/beta_fallback_credit_usage.rb', line 65 def self.new(type:, **args) case type.to_sym when :redeemed Anthropic::Beta::BetaFallbackCreditRedeemed.new(**args) when :not_applied Anthropic::Beta::BetaFallbackCreditNotApplied.new(**args) else raise ArgumentError, "unknown type: #{type}" end end |
.variants ⇒ Array(Anthropic::Models::Beta::BetaFallbackCreditRedeemed, Anthropic::Models::Beta::BetaFallbackCreditNotApplied)
|
|
# File 'lib/anthropic/models/beta/beta_fallback_credit_usage.rb', line 46
|
Instance Method Details
#self?.variants ⇒ ::Array[Anthropic::Models::Beta::BetaFallbackCreditUsage::status]
27 |
# File 'sig/anthropic/models/beta/beta_fallback_credit_usage.rbs', line 27
def self?.variants: -> ::Array[Anthropic::Models::Beta::BetaFallbackCreditUsage::status]
|