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 CartUpdateBuilderbuilder()builder factory method for CartUpdatestatic CartUpdateBuilderbuilder(CartUpdate template) create builder for CartUpdate instancecopyDeep()static CartUpdatedeepCopy(CartUpdate template) factory method to create a deep copy of CartUpdate@NotNull @Valid List<CartUpdateAction>Update actions to be performed on the Cart.@NotNull LongExpected version of the Cart on which the changes apply.static CartUpdateof()factory methodstatic CartUpdateof(CartUpdate template) factory method to create a shallow copy CartUpdatevoidsetActions(CartUpdateAction... actions) Update actions to be performed on the Cart.voidsetActions(List<CartUpdateAction> actions) Update actions to be performed on the Cart.voidsetVersion(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> TwithCartUpdate(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:
getVersionin interfaceResourceUpdate<CartUpdate,CartUpdateAction, CartUpdateBuilder> - Returns:
- version
-
getActions
Update actions to be performed on the Cart.
- Specified by:
getActionsin 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:
setVersionin 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:
setActionsin 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
-
copyDeep
CartUpdate copyDeep() -
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
-