Interface ProductDiscountUpdate
- All Superinterfaces:
ResourceUpdate<ProductDiscountUpdate,
ProductDiscountUpdateAction, ProductDiscountUpdateBuilder>
public interface ProductDiscountUpdate
extends ResourceUpdate<ProductDiscountUpdate,ProductDiscountUpdateAction,ProductDiscountUpdateBuilder>
ProductDiscountUpdate
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()
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProductDiscountUpdateBuilder
builder()
builder factory method for ProductDiscountUpdatestatic ProductDiscountUpdateBuilder
builder
(ProductDiscountUpdate template) create builder for ProductDiscountUpdate instancestatic ProductDiscountUpdate
deepCopy
(ProductDiscountUpdate template) factory method to create a deep copy of ProductDiscountUpdate@NotNull @Valid List<ProductDiscountUpdateAction>
Update actions to be performed on the ProductDiscount.@NotNull Long
Expected version of the ProductDiscount on which the changes should be applied.static ProductDiscountUpdate
of()
factory methodstatic ProductDiscountUpdate
of
(ProductDiscountUpdate template) factory method to create a shallow copy ProductDiscountUpdatevoid
setActions
(ProductDiscountUpdateAction... actions) Update actions to be performed on the ProductDiscount.void
setActions
(List<ProductDiscountUpdateAction> actions) Update actions to be performed on the ProductDiscount.void
setVersion
(Long version) Expected version of the ProductDiscount on which the changes should be applied.static com.fasterxml.jackson.core.type.TypeReference<ProductDiscountUpdate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdate
get
-
Method Details
-
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.
- Specified by:
getVersion
in interfaceResourceUpdate<ProductDiscountUpdate,
ProductDiscountUpdateAction, ProductDiscountUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the ProductDiscount.
- Specified by:
getActions
in interfaceResourceUpdate<ProductDiscountUpdate,
ProductDiscountUpdateAction, ProductDiscountUpdateBuilder> - Returns:
- actions
-
setVersion
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.
- Specified by:
setVersion
in interfaceResourceUpdate<ProductDiscountUpdate,
ProductDiscountUpdateAction, ProductDiscountUpdateBuilder> - Parameters:
version
- value to be set
-
setActions
Update actions to be performed on the ProductDiscount.
- Parameters:
actions
- values to be set
-
setActions
Update actions to be performed on the ProductDiscount.
- Specified by:
setActions
in interfaceResourceUpdate<ProductDiscountUpdate,
ProductDiscountUpdateAction, ProductDiscountUpdateBuilder> - Parameters:
actions
- values to be set
-
of
factory method- Returns:
- instance of ProductDiscountUpdate
-
of
factory method to create a shallow copy ProductDiscountUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of ProductDiscountUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for ProductDiscountUpdate- Returns:
- builder
-
builder
create builder for ProductDiscountUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withProductDiscountUpdate
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-