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