Interface CartUpdate
- All Superinterfaces:
ResourceUpdate<CartUpdate,
CartUpdateAction, CartUpdateBuilder>
CartUpdate
Example to create an instance using the builder pattern
Example to create an instance using the builder pattern
CartUpdate cartUpdate = CartUpdate.builder()
.version(0.3)
.plusActions(actionsBuilder -> actionsBuilder)
.build()
-
Method Summary
Modifier and TypeMethodDescriptionstatic CartUpdateBuilder
builder()
builder factory method for CartUpdatestatic CartUpdateBuilder
builder
(CartUpdate template) create builder for CartUpdate instancestatic CartUpdate
deepCopy
(CartUpdate template) factory method to create a deep copy of CartUpdate@NotNull @Valid List<CartUpdateAction>
Update actions to be performed on the Cart.@NotNull Long
Expected version of the Cart on which the changes apply.static CartUpdate
of()
factory methodstatic CartUpdate
of
(CartUpdate template) factory method to create a shallow copy CartUpdatevoid
setActions
(CartUpdateAction... actions) Update actions to be performed on the Cart.void
setActions
(List<CartUpdateAction> actions) Update actions to be performed on the Cart.void
setVersion
(Long version) Expected version of the Cart on which the changes apply.static com.fasterxml.jackson.core.type.TypeReference<CartUpdate>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withCartUpdate
(Function<CartUpdate, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.ResourceUpdate
get
-
Method Details
-
getVersion
Expected version of the Cart on which the changes apply. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Specified by:
getVersion
in interfaceResourceUpdate<CartUpdate,
CartUpdateAction, CartUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the Cart.
- Specified by:
getActions
in interfaceResourceUpdate<CartUpdate,
CartUpdateAction, CartUpdateBuilder> - Returns:
- actions
-
setVersion
Expected version of the Cart on which the changes apply. If the expected version does not match the actual version, a ConcurrentModification error will be returned.
- Specified by:
setVersion
in interfaceResourceUpdate<CartUpdate,
CartUpdateAction, CartUpdateBuilder> - Parameters:
version
- value to be set
-
setActions
Update actions to be performed on the Cart.
- Parameters:
actions
- values to be set
-
setActions
Update actions to be performed on the Cart.
- Specified by:
setActions
in interfaceResourceUpdate<CartUpdate,
CartUpdateAction, CartUpdateBuilder> - Parameters:
actions
- values to be set
-
of
factory method- Returns:
- instance of CartUpdate
-
of
factory method to create a shallow copy CartUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartUpdate- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartUpdate- Returns:
- builder
-
builder
create builder for CartUpdate instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartUpdate
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
-