Class PaymentMethodUpdateBuilder
java.lang.Object
com.commercetools.api.models.payment_method.PaymentMethodUpdateBuilder
- All Implemented Interfaces:
Builder<PaymentMethodUpdate>
PaymentMethodUpdateBuilder
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
PaymentMethodUpdate paymentMethodUpdate = PaymentMethodUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactions
(PaymentMethodUpdateAction... actions) Update actions to be performed on the PaymentMethod.actions
(List<PaymentMethodUpdateAction> actions) Update actions to be performed on the PaymentMethod.build()
builds PaymentMethodUpdate with checking for non-null required valuesbuilds PaymentMethodUpdate without checking for non-null required valuesUpdate actions to be performed on the PaymentMethod.Expected version of the PaymentMethod on which the changes should be applied.static PaymentMethodUpdateBuilder
of()
factory method for an instance of PaymentMethodUpdateBuilderstatic PaymentMethodUpdateBuilder
of
(PaymentMethodUpdate template) create builder for PaymentMethodUpdate instanceplusActions
(PaymentMethodUpdateAction... actions) Update actions to be performed on the PaymentMethod.plusActions
(Function<PaymentMethodUpdateActionBuilder, Builder<? extends PaymentMethodUpdateAction>> builder) Update actions to be performed on the PaymentMethod.Expected version of the PaymentMethod on which the changes should be applied.withActions
(Function<PaymentMethodUpdateActionBuilder, Builder<? extends PaymentMethodUpdateAction>> builder) Update actions to be performed on the PaymentMethod.
-
Constructor Details
-
PaymentMethodUpdateBuilder
public PaymentMethodUpdateBuilder()
-
-
Method Details
-
version
Expected version of the PaymentMethod 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 PaymentMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
actions
Update actions to be performed on the PaymentMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
Update actions to be performed on the PaymentMethod.
- Parameters:
actions
- value to be set- Returns:
- Builder
-
plusActions
public PaymentMethodUpdateBuilder plusActions(Function<PaymentMethodUpdateActionBuilder, Builder<? extends PaymentMethodUpdateAction>> builder) Update actions to be performed on the PaymentMethod.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
withActions
public PaymentMethodUpdateBuilder withActions(Function<PaymentMethodUpdateActionBuilder, Builder<? extends PaymentMethodUpdateAction>> builder) Update actions to be performed on the PaymentMethod.
- Parameters:
builder
- function to build the actions value- Returns:
- Builder
-
getVersion
Expected version of the PaymentMethod 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 PaymentMethod.
- Returns:
- actions
-
build
builds PaymentMethodUpdate with checking for non-null required values- Specified by:
build
in interfaceBuilder<PaymentMethodUpdate>
- Returns:
- PaymentMethodUpdate
-
buildUnchecked
builds PaymentMethodUpdate without checking for non-null required values- Returns:
- PaymentMethodUpdate
-
of
factory method for an instance of PaymentMethodUpdateBuilder- Returns:
- builder
-
of
create builder for PaymentMethodUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-