Class: Anthropic::Models::Beta::Organization::BetaSpendSummary

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

Defined Under Namespace

Modules: Actor, Scope, Source

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(actor:, amount:, currency:, period:, period_to_date_spend:, scope:, source:, spend_limit_id:) ⇒ void

Per-member effective-limit report row (GET /spend_limits/effective).

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

Parameters:



# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 60


Instance Attribute Details

#actor ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserActor, Anthropic::Models::Beta::Organization::BetaSpendLimitScopedAPIKeyActor

Parameters:

  • value (Anthropic::Models::Beta::Organization::BetaSpendSummary::actor)

Returns:



11
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 11

required :actor, union: -> { Anthropic::Beta::Organization::BetaSpendSummary::Actor }

#amount ⇒ String?

Effective limit amount as a non-negative integer decimal string in the minor unit of currency (cents for USD). null means no limit applies for this row's period — each period resolves independently, so another period may still cap this member.

Parameters:

  • value (String, nil)

Returns:

  • (String, nil)


20
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 20

required :amount, String, nil?: true

#currency ⇒ String

ISO 4217 code of the organization's billing currency; the unit for amount and period_to_date_spend.

Parameters:

  • value (String)

Returns:

  • (String)


27
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 27

required :currency, String

#period ⇒ Symbol, Anthropic::Models::Beta::Organization::BetaSpendLimitPeriod

Period this row's effective limit and spend are reported for.

Parameters:

  • value (Anthropic::Models::Beta::Organization::beta_spend_limit_period)

Returns:



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

required :period, enum: -> { Anthropic::Beta::Organization::BetaSpendLimitPeriod }

#period_to_date_spend ⇒ String

The member's spend so far in the current period, as a non-negative decimal string in the minor unit of currency (cents for USD). May carry fractional minor units up to three decimal places (e.g. "12050.5") — metered usage is not rounded to whole cents. Reads as "0" when the spend reading is temporarily unavailable.

Parameters:

  • value (String)

Returns:

  • (String)


43
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 43

required :period_to_date_spend, String

#scope ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, ...



48
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 48

required :scope, union: -> { Anthropic::Beta::Organization::BetaSpendSummary::Scope }

#source ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, ...



53
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 53

required :source, union: -> { Anthropic::Beta::Organization::BetaSpendSummary::Source }

#spend_limit_id ⇒ String

Parameters:

  • value (String)

Returns:

  • (String)


58
# File 'lib/anthropic/models/beta/organization/beta_spend_summary.rb', line 58

required :spend_limit_id, String

Instance Method Details

#to_hash ⇒ {

Returns:

  • ({)


45
# File 'sig/anthropic/models/beta/organization/beta_spend_summary.rbs', line 45

def to_hash: -> {