Interface DiscountCodeUpdate
- All Superinterfaces:
ResourceUpdate<DiscountCodeUpdate,
DiscountCodeUpdateAction, DiscountCodeUpdateBuilder>
public interface DiscountCodeUpdate
extends ResourceUpdate<DiscountCodeUpdate,DiscountCodeUpdateAction,DiscountCodeUpdateBuilder>
DiscountCodeUpdate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
DiscountCodeUpdate discountCodeUpdate = DiscountCodeUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic DiscountCodeUpdateBuilder
builder()
builder factory method for DiscountCodeUpdatestatic DiscountCodeUpdateBuilder
builder
(DiscountCodeUpdate template) create builder for DiscountCodeUpdate instancestatic DiscountCodeUpdate
deepCopy
(DiscountCodeUpdate template) factory method to create a deep copy of DiscountCodeUpdate@NotNull @Valid List<DiscountCodeUpdateAction>
Update actions to be performed on the DiscountCode.@NotNull Long
Expected version of the DiscountCode on which the changes should be applied.static DiscountCodeUpdate
of()
factory methodstatic DiscountCodeUpdate
of
(DiscountCodeUpdate template) factory method to create a shallow copy DiscountCodeUpdatevoid
setActions
(DiscountCodeUpdateAction... actions) Update actions to be performed on the DiscountCode.void
setActions
(List<DiscountCodeUpdateAction> actions) Update actions to be performed on the DiscountCode.void
setVersion
(Long version) Expected version of the DiscountCode on which the changes should be applied.static com.fasterxml.jackson.core.type.TypeReference<DiscountCodeUpdate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withDiscountCodeUpdate
(Function<DiscountCodeUpdate, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdate
get
-
Method Details
-
getVersion
Expected version of the DiscountCode 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<DiscountCodeUpdate,
DiscountCodeUpdateAction, DiscountCodeUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the DiscountCode.
- Specified by:
getActions
in interfaceResourceUpdate<DiscountCodeUpdate,
DiscountCodeUpdateAction, DiscountCodeUpdateBuilder> - Returns:
- actions
-
setVersion
Expected version of the DiscountCode 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<DiscountCodeUpdate,
DiscountCodeUpdateAction, DiscountCodeUpdateBuilder> - Parameters:
version
- value to be set
-
setActions
Update actions to be performed on the DiscountCode.
- Parameters:
actions
- values to be set
-
setActions
Update actions to be performed on the DiscountCode.
- Specified by:
setActions
in interfaceResourceUpdate<DiscountCodeUpdate,
DiscountCodeUpdateAction, DiscountCodeUpdateBuilder> - Parameters:
actions
- values to be set
-
of
factory method- Returns:
- instance of DiscountCodeUpdate
-
of
factory method to create a shallow copy DiscountCodeUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of DiscountCodeUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for DiscountCodeUpdate- Returns:
- builder
-
builder
create builder for DiscountCodeUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withDiscountCodeUpdate
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
-