Class PaymentUpdateBuilder
java.lang.Object
com.commercetools.api.models.payment.PaymentUpdateBuilder
- All Implemented Interfaces:
Builder<PaymentUpdate>
PaymentUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PaymentUpdate paymentUpdate = PaymentUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactions
(PaymentUpdateAction... actions) Update actions to be performed on the Payment.actions
(List<PaymentUpdateAction> actions) Update actions to be performed on the Payment.build()
builds PaymentUpdate with checking for non-null required valuesbuilds PaymentUpdate without checking for non-null required valuesUpdate actions to be performed on the Payment.Expected version of the Payment on which the changes should be applied.static PaymentUpdateBuilder
of()
factory method for an instance of PaymentUpdateBuilderstatic PaymentUpdateBuilder
of
(PaymentUpdate template) create builder for PaymentUpdate instanceplusActions
(PaymentUpdateAction... actions) Update actions to be performed on the Payment.plusActions
(Function<PaymentUpdateActionBuilder, Builder<? extends PaymentUpdateAction>> builder) Update actions to be performed on the Payment.Expected version of the Payment on which the changes should be applied.withActions
(Function<PaymentUpdateActionBuilder, Builder<? extends PaymentUpdateAction>> builder) Update actions to be performed on the Payment.
-
Constructor Details
-
PaymentUpdateBuilder
public PaymentUpdateBuilder()
-
-
Method Details
-
version
Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Parameters:
version
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the Payment.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the Payment.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the Payment.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public PaymentUpdateBuilder plusActions(Function<PaymentUpdateActionBuilder, Builder<? extends PaymentUpdateAction>> builder) Update actions to be performed on the Payment.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public PaymentUpdateBuilder withActions(Function<PaymentUpdateActionBuilder, Builder<? extends PaymentUpdateAction>> builder) Update actions to be performed on the Payment.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the Payment on which the changes should be applied. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Returns:
- version
-
getActions
Update actions to be performed on the Payment.
- Returns:
- actions
-
build
builds PaymentUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentUpdate>
- Returns:
- PaymentUpdate
-
buildUnchecked
builds PaymentUpdate without checking for non-null required values- Returns:
- PaymentUpdate
-
of
factory method for an instance of PaymentUpdateBuilder- Returns:
- builder
-
of
create builder for PaymentUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-