Class OrderAddPaymentActionBuilder
java.lang.Object
com.commercetools.api.models.order.OrderAddPaymentActionBuilder
- All Implemented Interfaces:
Builder<OrderAddPaymentAction>
OrderAddPaymentActionBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
OrderAddPaymentAction orderAddPaymentAction = OrderAddPaymentAction.builder()
.payment(paymentBuilder -> paymentBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()builds OrderAddPaymentAction with checking for non-null required valuesbuilds OrderAddPaymentAction without checking for non-null required valuesPayment to add to the PaymentInfo.static OrderAddPaymentActionBuilderof()factory method for an instance of OrderAddPaymentActionBuilderstatic OrderAddPaymentActionBuilderof(OrderAddPaymentAction template) create builder for OrderAddPaymentAction instancepayment(PaymentResourceIdentifier payment) Payment to add to the PaymentInfo.Payment to add to the PaymentInfo.Payment to add to the PaymentInfo.
-
Constructor Details
-
OrderAddPaymentActionBuilder
public OrderAddPaymentActionBuilder()
-
-
Method Details
-
payment
public OrderAddPaymentActionBuilder payment(Function<PaymentResourceIdentifierBuilder, PaymentResourceIdentifierBuilder> builder) Payment to add to the PaymentInfo. Must not be assigned to another Order or active Cart already.
- Parameters:
builder- function to build the payment value- Returns:
- Builder
-
withPayment
public OrderAddPaymentActionBuilder withPayment(Function<PaymentResourceIdentifierBuilder, PaymentResourceIdentifier> builder) Payment to add to the PaymentInfo. 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 PaymentInfo. 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 PaymentInfo. Must not be assigned to another Order or active Cart already.
- Returns:
- payment
-
build
builds OrderAddPaymentAction with checking for non-null required values- Specified by:
buildin interfaceBuilder<OrderAddPaymentAction>- Returns:
- OrderAddPaymentAction
-
buildUnchecked
builds OrderAddPaymentAction without checking for non-null required values- Returns:
- OrderAddPaymentAction
-
of
factory method for an instance of OrderAddPaymentActionBuilder- Returns:
- builder
-
of
create builder for OrderAddPaymentAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-