Package com.commercetools.api.models.me
Class MyCartAddPaymentActionBuilder
java.lang.Object
com.commercetools.api.models.me.MyCartAddPaymentActionBuilder
- All Implemented Interfaces:
Builder<MyCartAddPaymentAction>
public class MyCartAddPaymentActionBuilder
extends Object
implements Builder<MyCartAddPaymentAction>
MyCartAddPaymentActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
MyCartAddPaymentAction myCartAddPaymentAction = MyCartAddPaymentAction.builder()
.payment(paymentBuilder -> paymentBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds MyCartAddPaymentAction with checking for non-null required valuesbuilds MyCartAddPaymentAction without checking for non-null required valuesPayment to add to the Cart.of()factory method for an instance of MyCartAddPaymentActionBuilderof(MyCartAddPaymentAction template) create builder for MyCartAddPaymentAction instancepayment(PaymentResourceIdentifier payment) Payment to add to the Cart.Payment to add to the Cart.Payment to add to the Cart.
-
Constructor Details
-
MyCartAddPaymentActionBuilder
public MyCartAddPaymentActionBuilder()
-
-
Method Details
-
payment
public MyCartAddPaymentActionBuilder payment(Function<PaymentResourceIdentifierBuilder, PaymentResourceIdentifierBuilder> builder) Payment to add to the Cart. Must not be assigned to another Order or active Cart already.
- Parameters:
builder- function to build the payment value- Returns:
- Builder
-
withPayment
public MyCartAddPaymentActionBuilder withPayment(Function<PaymentResourceIdentifierBuilder, PaymentResourceIdentifier> builder) Payment to add to the Cart. Must not be assigned to another Order or active Cart already.
- Parameters:
builder- function to build the payment value- Returns:
- Builder
-
payment
Payment to add to the Cart. Must not be assigned to another Order or active Cart already.
- Parameters:
payment- value to be set- Returns:
- Builder
-
getPayment
Payment to add to the Cart. Must not be assigned to another Order or active Cart already.
- Returns:
- payment
-
build
builds MyCartAddPaymentAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<MyCartAddPaymentAction>- Returns:
- MyCartAddPaymentAction
-
buildUnchecked
builds MyCartAddPaymentAction without checking for non-null required values- Returns:
- MyCartAddPaymentAction
-
of
factory method for an instance of MyCartAddPaymentActionBuilder- Returns:
- builder
-
of
create builder for MyCartAddPaymentAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-