Interface PaymentLineItem.Builder
- All Superinterfaces:
Buildable,CopyableBuilder<PaymentLineItem.Builder,,PaymentLineItem> SdkBuilder<PaymentLineItem.Builder,,PaymentLineItem> SdkPojo
- Enclosing class:
PaymentLineItem
@Mutable
@NotThreadSafe
public static interface PaymentLineItem.Builder
extends SdkPojo, CopyableBuilder<PaymentLineItem.Builder,PaymentLineItem>
-
Method Summary
Modifier and TypeMethodDescriptiondefault PaymentLineItem.Builderamount(Consumer<PaymentIntentAmount.Builder> amount) The unit price of one item.amount(PaymentIntentAmount amount) The unit price of one item.The quantity of this line item.The SKU identifier for this line item.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
-
sku
The SKU identifier for this line item.
- Parameters:
sku- The SKU identifier for this line item.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
quantity
The quantity of this line item. Defaults to 1 if not specified.
- Parameters:
quantity- The quantity of this line item. Defaults to 1 if not specified.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
amount
The unit price of one item. The line total is
amount×quantity.- Parameters:
amount- The unit price of one item. The line total isamount×quantity.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
amount
The unit price of one item. The line total is
This is a convenience method that creates an instance of theamount×quantity.PaymentIntentAmount.Builderavoiding the need to create one manually viaPaymentIntentAmount.builder().When the
Consumercompletes,SdkBuilder.build()is called immediately and its result is passed toamount(PaymentIntentAmount).- Parameters:
amount- a consumer that will call methods onPaymentIntentAmount.Builder- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
-