Class BetaSpendLimit
-
- All Implemented Interfaces:
public final class BetaSpendLimitA configured spend limit: a cap on metered spend for one scope and period.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classBetaSpendLimit.BuilderA builder for BetaSpendLimit.
public final classBetaSpendLimit.ScopeWhat the limit applies to. A tagged union on
type; each variant carries the identifier for its scope.
-
Method Summary
Modifier and Type Method Description final Stringid()Unique tagged ID of the spend limit ( spl_...).final Optional<String>amount()Limit amount as a non-negative integer decimal string in the minor unit of currency(cents for USD): "50000" is $500.00.final OffsetDateTimecreatedAt()RFC 3339 datetime at which the spend limit was created. final Stringcurrency()ISO 4217 code of the organization's billing currency; the unit for amount.final BooleanisEnabled()Read-only. final BetaSpendLimitPeriodperiod()Length of the window the limit resets over. final BetaSpendLimit.Scopescope()What the limit applies to. final OffsetDateTimeupdatedAt()RFC 3339 datetime at which the spend limit was last modified. final JsonValue_type()Object type. final JsonField<String>_id()Returns the raw JSON value of id. final JsonField<String>_amount()Returns the raw JSON value of amount. final JsonField<OffsetDateTime>_createdAt()Returns the raw JSON value of createdAt. final JsonField<String>_currency()Returns the raw JSON value of currency. final JsonField<Boolean>_isEnabled()Returns the raw JSON value of isEnabled. final JsonField<BetaSpendLimitPeriod>_period()Returns the raw JSON value of period. final JsonField<BetaSpendLimit.Scope>_scope()Returns the raw JSON value of scope. final JsonField<OffsetDateTime>_updatedAt()Returns the raw JSON value of updatedAt. final Map<String, JsonValue>_additionalProperties()final BetaSpendLimit.BuildertoBuilder()final BetaSpendLimitvalidate()Validates that the types of all values in this object match their expected types recursively. final BooleanisValid()Booleanequals(Object other)IntegerhashCode()StringtoString()final static BetaSpendLimit.Builderbuilder()Returns a mutable builder for constructing an instance of BetaSpendLimit. -
-
Method Detail
-
amount
final Optional<String> amount()
Limit amount as a non-negative integer decimal string in the minor unit of
currency(cents for USD): "50000" is $500.00.nullmeans no numeric cap is configured at this scope — see the effective report for whether a limit applies.
-
createdAt
final OffsetDateTime createdAt()
RFC 3339 datetime at which the spend limit was created.
-
currency
final String currency()
ISO 4217 code of the organization's billing currency; the unit for
amount.
-
isEnabled
final Boolean isEnabled()
Read-only.
falsewhen extra usage is switched off for this organization (organizationlimit);amountis kept and applies again when it's switched back on. Alwaystruefor other limits.
-
period
final BetaSpendLimitPeriod period()
Length of the window the limit resets over.
amountcaps spend within each period.
-
scope
final BetaSpendLimit.Scope scope()
What the limit applies to. A tagged union on
type; each variant carries the identifier for its scope.
-
updatedAt
final OffsetDateTime updatedAt()
RFC 3339 datetime at which the spend limit was last modified.
-
_type
final JsonValue _type()
Object type. Always
spend_limit.Expected to always return the following:
JsonValue.from("spend_limit")However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_amount
final JsonField<String> _amount()
Returns the raw JSON value of amount.
Unlike amount, this method doesn't throw if the JSON field has an unexpected type.
-
_createdAt
final JsonField<OffsetDateTime> _createdAt()
Returns the raw JSON value of createdAt.
Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.
-
_currency
final JsonField<String> _currency()
Returns the raw JSON value of currency.
Unlike currency, this method doesn't throw if the JSON field has an unexpected type.
-
_isEnabled
final JsonField<Boolean> _isEnabled()
Returns the raw JSON value of isEnabled.
Unlike isEnabled, this method doesn't throw if the JSON field has an unexpected type.
-
_period
final JsonField<BetaSpendLimitPeriod> _period()
Returns the raw JSON value of period.
Unlike period, this method doesn't throw if the JSON field has an unexpected type.
-
_scope
final JsonField<BetaSpendLimit.Scope> _scope()
Returns the raw JSON value of scope.
Unlike scope, this method doesn't throw if the JSON field has an unexpected type.
-
_updatedAt
final JsonField<OffsetDateTime> _updatedAt()
Returns the raw JSON value of updatedAt.
Unlike updatedAt, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final BetaSpendLimit.Builder toBuilder()
-
validate
final BetaSpendLimit validate()
Validates that the types of all values in this object match their expected types recursively.
This method is not forwards compatible with new types from the API for existing fields.
-
builder
final static BetaSpendLimit.Builder builder()
Returns a mutable builder for constructing an instance of BetaSpendLimit.
The following fields are required:
.id() .amount() .createdAt() .currency() .isEnabled() .period() .scope() .updatedAt()
-
-
-
-