Interface CartDiscountAddStoreAction
- All Superinterfaces:
CartDiscountUpdateAction
,ResourceUpdateAction<CartDiscountUpdateAction>
If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
This action generates a CartDiscountStoreAdded Message.
Example to create an instance using the builder pattern
CartDiscountAddStoreAction cartDiscountAddStoreAction = CartDiscountAddStoreAction.builder()
.store(storeBuilder -> storeBuilder)
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for CartDiscountAddStoreActionbuilder
(CartDiscountAddStoreAction template) create builder for CartDiscountAddStoreAction instancestatic CartDiscountAddStoreAction
deepCopy
(CartDiscountAddStoreAction template) factory method to create a deep copy of CartDiscountAddStoreAction@NotNull @Valid StoreResourceIdentifier
getStore()
Store to add.static CartDiscountAddStoreAction
of()
factory methodstatic CartDiscountAddStoreAction
of
(CartDiscountAddStoreAction template) factory method to create a shallow copy CartDiscountAddStoreActionvoid
setStore
(StoreResourceIdentifier store) Store to add.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountAddStoreAction>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountUpdateAction
getAction, withCartDiscountUpdateAction
Methods inherited from interface com.commercetools.api.models.ResourceUpdateAction
get
-
Field Details
-
ADD_STORE
discriminator value for CartDiscountAddStoreAction- See Also:
-
-
Method Details
-
getStore
Store to add.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Returns:
- store
-
setStore
Store to add.
A failed update can return the following errors:
- If the referenced Stores exceed the limit, a MaxStoreReferencesReached error is returned.
- If the referenced Stores exceed the limit for Cart Discounts that do not require a Discount Code, a StoreCartDiscountsLimitReached error is returned.
- Parameters:
store
- value to be set
-
of
factory method- Returns:
- instance of CartDiscountAddStoreAction
-
of
factory method to create a shallow copy CartDiscountAddStoreAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of CartDiscountAddStoreAction- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountAddStoreAction- Returns:
- builder
-
builder
create builder for CartDiscountAddStoreAction instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountAddStoreAction
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
-