Class: Anthropic::Models::Beta::BetaFallbackCreditNotApplied

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/anthropic/models/beta/beta_fallback_credit_not_applied.rb,
sig/anthropic/models/beta/beta_fallback_credit_not_applied.rbs

Defined Under Namespace

Modules: Reason

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(reason:, remove_to_redeem: nil, type: :not_applied) ⇒ Object

Some parameter documentations has been truncated, see Anthropic::Models::Beta::BetaFallbackCreditNotApplied for more details.

No reprice was applied; reason says why.

Parameters:

  • reason (Symbol, Anthropic::Models::Beta::BetaFallbackCreditNotApplied::Reason)

    Why the reprice was not applied.

  • remove_to_redeem (Array<String>, nil) (defaults to: nil)

    Request fields to remove before retrying, so the retry can redeem this

  • type (Symbol, :not_applied) (defaults to: :not_applied)


# File 'lib/anthropic/models/beta/beta_fallback_credit_not_applied.rb', line 33

Instance Attribute Details

#reasonSymbol, Anthropic::Models::Beta::BetaFallbackCreditNotApplied::Reason

Why the reprice was not applied.

A closed enum; additions to the redemption-check vocabulary arrive as deliberate schema updates.

Parameters:

  • value (Anthropic::Models::Beta::BetaFallbackCreditNotApplied::reason)

Returns:



14
# File 'lib/anthropic/models/beta/beta_fallback_credit_not_applied.rb', line 14

required :reason, enum: -> { Anthropic::Beta::BetaFallbackCreditNotApplied::Reason }

#remove_to_redeemArray<String>?

Request fields to remove before retrying, so the retry can redeem this token.

Present exactly when reason is variant_fields_present — never null, never an empty array; absent otherwise. Fields are named only from your own request, and only after the sealed variant hash matched. A served best-effort retry has already been billed at normal price; nothing redeems retroactively, but a corrected re-send inside the token's five-minute window can still redeem.

Parameters:

  • value (::Array[String], nil)

Returns:

  • (Array<String>, nil)


31
# File 'lib/anthropic/models/beta/beta_fallback_credit_not_applied.rb', line 31

optional :remove_to_redeem, Anthropic::Internal::Type::ArrayOf[String], nil?: true

#typeSymbol, :not_applied

Parameters:

  • value (:not_applied)

Returns:

  • (Symbol, :not_applied)


19
# File 'lib/anthropic/models/beta/beta_fallback_credit_not_applied.rb', line 19

required :type, const: :not_applied

Instance Method Details

#to_hash{

Returns:

  • ({)


26
# File 'sig/anthropic/models/beta/beta_fallback_credit_not_applied.rbs', line 26

def to_hash: -> {