Interface CustomCharge.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<CustomCharge.Builder,,CustomCharge> SdkBuilder<CustomCharge.Builder,,CustomCharge> SdkPojo
- Enclosing class:
CustomCharge
-
Method Summary
Modifier and TypeMethodDescriptionThe charge, as a decimal string in major currency units (for example, "12.50").Caller-chosen stable id for THIS charge.The ISO 4217 currency of the amount.description(String description) Human-readable description, surfaced on the invoice line.Optional metric this charge derives from.Optional product tax code; defaults to the service default when omitted.Methods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation, buildMethods inherited from interface software.amazon.awssdk.core.SdkPojo
equalsBySdkFields, sdkFieldNameToField, sdkFields
-
Method Details
-
chargeId
Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).
- Parameters:
chargeId- Caller-chosen stable id for THIS charge. It is the idempotency and replace key: re-submitting the same chargeId within its assigned period upserts the charge in place. A chargeId is bound to the first period it is accepted into; re-submitting it after that period rolls over is refused (ConflictException) rather than billing it again, so it must be unique per charge for this user across all periods — use a UUID or your own invoice-line id (the caller does not know the billing period, so it cannot be encoded in the id).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
description
Human-readable description, surfaced on the invoice line.
- Parameters:
description- Human-readable description, surfaced on the invoice line.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
amount
The charge, as a decimal string in major currency units (for example, "12.50").
- Parameters:
amount- The charge, as a decimal string in major currency units (for example, "12.50").- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
currency
The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.
- Parameters:
currency- The ISO 4217 currency of the amount. Only USD is supported; a non-USD value is rejected.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
metricId
Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).
- Parameters:
metricId- Optional metric this charge derives from. Omitted for a charge not tied to a metric (a flat or custom fee).- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
taxCode
Optional product tax code; defaults to the service default when omitted.
- Parameters:
taxCode- Optional product tax code; defaults to the service default when omitted.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-