Interface OrderSetStoreAction
- All Superinterfaces:
OrderUpdateAction
,ResourceUpdateAction<OrderUpdateAction>
Sets the Store the Order is assigned to. It should be used to migrate Orders to a new Store. No validations are performed (such as that the Customer is allowed to create Orders in the Store).
Produces the Order Store Set Message. Returns a 400
error if store
references the same Store the Order is currently assigned to, including if you try to remove the value when no Store is currently assigned.
Example to create an instance using the builder pattern
OrderSetStoreAction orderSetStoreAction = OrderSetStoreAction.builder()
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OrderSetStoreActionBuilder
builder()
builder factory method for OrderSetStoreActionstatic OrderSetStoreActionBuilder
builder
(OrderSetStoreAction template) create builder for OrderSetStoreAction instancestatic OrderSetStoreAction
deepCopy
(OrderSetStoreAction template) factory method to create a deep copy of OrderSetStoreAction@Valid StoreResourceIdentifier
getStore()
Value to set.static OrderSetStoreAction
of()
factory methodstatic OrderSetStoreAction
of
(OrderSetStoreAction template) factory method to create a shallow copy OrderSetStoreActionvoid
setStore
(StoreResourceIdentifier store) Value to set.static com.fasterxml.jackson.core.type.TypeReference<OrderSetStoreAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOrderSetStoreAction
(Function<OrderSetStoreAction, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.order.OrderUpdateAction
getAction, withOrderUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
SET_STORE
discriminator value for OrderSetStoreAction- See Also:
-
-
Method Details
-
getStore
Value to set. If empty, any existing value is removed.
If
store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a400
error is returned.- Returns:
- store
-
setStore
Value to set. If empty, any existing value is removed.
If
store
references the same Store the Order is currently assigned to or if you try to remove the value when no Store is currently assigned, a400
error is returned.- Parameters:
store
- value to be set
-
of
factory method- Returns:
- instance of OrderSetStoreAction
-
of
factory method to create a shallow copy OrderSetStoreAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OrderSetStoreAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OrderSetStoreAction- Returns:
- builder
-
builder
create builder for OrderSetStoreAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOrderSetStoreAction
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
-