Class SpendLimitSetParams.Body.Builder
-
- All Implemented Interfaces:
public final class SpendLimitSetParams.Body.BuilderA builder for Body.
-
-
Method Summary
-
-
Method Detail
-
amount
final SpendLimitSetParams.Body.Builder amount(String amount)
Limit amount as a non-negative integer decimal string in the minor unit of the organization's billing currency (cents for USD): "50000" is $500.00.
nullsets an explicit no-limit override for this scope andperiodonly — each period resolves independently, so caps for other periods still apply.
-
amount
final SpendLimitSetParams.Body.Builder amount(Optional<String> amount)
Alias for calling Builder.amount with
amount.orElse(null).
-
amount
final SpendLimitSetParams.Body.Builder amount(JsonField<String> amount)
Sets Builder.amount to an arbitrary JSON value.
You should usually call Builder.amount with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final SpendLimitSetParams.Body.Builder scope(SpendLimitSetParams.Scope scope)
What the limit applies to. Claude Enterprise organizations set
userlimits. Claude Console organizations setorganizationandworkspacelimits. Any other combination returns 400. Settingorganizationandworkspacelimits through the API is in an early access preview. To request access, contact your Anthropic account team.
-
scope
final SpendLimitSetParams.Body.Builder scope(JsonField<SpendLimitSetParams.Scope> scope)
Sets Builder.scope to an arbitrary JSON value.
You should usually call Builder.scope with a well-typed Scope value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
scope
final SpendLimitSetParams.Body.Builder scope(BetaSpendLimitUserScope user)
Alias for calling scope with
Scope.ofUser(user).
-
scope
final SpendLimitSetParams.Body.Builder scope(BetaSpendLimitOrganizationScope organization)
Alias for calling scope with
Scope.ofOrganization(organization).
-
scope
final SpendLimitSetParams.Body.Builder scope(BetaSpendLimitWorkspaceScope workspace)
Alias for calling scope with
Scope.ofWorkspace(workspace).
-
period
final SpendLimitSetParams.Body.Builder period(BetaSpendLimitPeriod period)
-
period
final SpendLimitSetParams.Body.Builder period(JsonField<BetaSpendLimitPeriod> period)
Sets Builder.period to an arbitrary JSON value.
You should usually call Builder.period with a well-typed BetaSpendLimitPeriod value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
additionalProperties
final SpendLimitSetParams.Body.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
userScope
final SpendLimitSetParams.Body.Builder userScope(String userId)
Alias for calling scope with the following:
BetaSpendLimitUserScope.builder() .userId(userId) .build()
-
workspaceScope
final SpendLimitSetParams.Body.Builder workspaceScope(String workspaceId)
Alias for calling scope with the following:
BetaSpendLimitWorkspaceScope.builder() .workspaceId(workspaceId) .build()
-
putAdditionalProperty
final SpendLimitSetParams.Body.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final SpendLimitSetParams.Body.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final SpendLimitSetParams.Body.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final SpendLimitSetParams.Body.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final SpendLimitSetParams.Body build()
Returns an immutable instance of Body.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.amount() .scope()
-
-
-
-