Class: Anthropic::Models::Beta::Organization::BetaSpendLimit
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Anthropic::Models::Beta::Organization::BetaSpendLimit
- Defined in:
- lib/anthropic/models/beta/organization/beta_spend_limit.rb,
sig/anthropic/models/beta/organization/beta_spend_limit.rbs
Overview
Defined Under Namespace
Modules: Scope
Instance Attribute Summary collapse
-
#amount ⇒ String?
Limit amount as a non-negative integer decimal string in the minor unit of
currency(cents for USD): "50000" is $500.00. -
#created_at ⇒ Time
RFC 3339 datetime at which the spend limit was created.
-
#currency ⇒ String
ISO 4217 code of the organization's billing currency; the unit for
amount. -
#id ⇒ String
Unique tagged ID of the spend limit (
spl_...). -
#is_enabled ⇒ Boolean
Read-only.
-
#period ⇒ Symbol, Anthropic::Models::Beta::Organization::BetaSpendLimitPeriod
Length of the window the limit resets over.
-
#scope ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, ...
What the limit applies to.
-
#type ⇒ Symbol, :spend_limit
Object type.
-
#updated_at ⇒ Time
RFC 3339 datetime at which the spend limit was last modified.
Instance Method Summary collapse
-
#initialize(id:, amount:, created_at:, currency:, is_enabled:, period:, scope:, updated_at:, type: :spend_limit) ⇒ void
constructor
A configured spend limit: a cap on metered spend for one scope and period.
- #to_hash ⇒ {
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(id:, amount:, created_at:, currency:, is_enabled:, period:, scope:, updated_at:, type: :spend_limit) ⇒ void
A configured spend limit: a cap on metered spend for one scope and period.
Some parameter documentations has been truncated, see Anthropic::Models::Beta::Organization::BetaSpendLimit for more details.
|
|
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 69
|
Instance Attribute Details
#amount ⇒ String?
Limit amount as a non-negative integer decimal string in the minor unit of
currency (cents for USD): "50000" is $500.00. null means no numeric cap is
configured at this scope — see the effective report for whether a limit applies.
21 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 21 required :amount, String, nil?: true |
#created_at ⇒ Time
RFC 3339 datetime at which the spend limit was created.
27 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 27 required :created_at, Time |
#currency ⇒ String
ISO 4217 code of the organization's billing currency; the unit for amount.
33 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 33 required :currency, String |
#id ⇒ String
Unique tagged ID of the spend limit (spl_...).
13 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 13 required :id, String |
#is_enabled ⇒ Boolean
Read-only. false when extra usage is switched off for this organization
(organization limit) or for this member (user limit); amount is kept and
applies again when it's switched back on. Always true for other limits.
41 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 41 required :is_enabled, Anthropic::Internal::Type::Boolean |
#period ⇒ Symbol, Anthropic::Models::Beta::Organization::BetaSpendLimitPeriod
Length of the window the limit resets over. amount caps spend within each
period.
48 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 48 required :period, enum: -> { Anthropic::Beta::Organization::BetaSpendLimitPeriod } |
#scope ⇒ Anthropic::Models::Beta::Organization::BetaSpendLimitUserScope, ...
What the limit applies to. A tagged union on type; each variant carries the
identifier for its scope.
55 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 55 required :scope, union: -> { Anthropic::Beta::Organization::BetaSpendLimit::Scope } |
#type ⇒ Symbol, :spend_limit
Object type. Always spend_limit.
61 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 61 required :type, const: :spend_limit |
#updated_at ⇒ Time
RFC 3339 datetime at which the spend limit was last modified.
67 |
# File 'lib/anthropic/models/beta/organization/beta_spend_limit.rb', line 67 required :updated_at, Time |
Instance Method Details
#to_hash ⇒ {
49 |
# File 'sig/anthropic/models/beta/organization/beta_spend_limit.rbs', line 49 def to_hash: -> { |