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
Fields -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartDiscountAddStoreActionbuilder(CartDiscountAddStoreAction template) create builder for CartDiscountAddStoreAction instancecopyDeep()static CartDiscountAddStoreActiondeepCopy(CartDiscountAddStoreAction template) factory method to create a deep copy of CartDiscountAddStoreAction@NotNull @Valid StoreResourceIdentifiergetStore()Store to add.static CartDiscountAddStoreActionof()factory methodstatic CartDiscountAddStoreActionof(CartDiscountAddStoreAction template) factory method to create a shallow copy CartDiscountAddStoreActionvoidsetStore(StoreResourceIdentifier store) Store to add.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountAddStoreAction>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.cart_discount.CartDiscountUpdateAction
getAction, withCartDiscountUpdateActionMethods 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
-
copyDeep
CartDiscountAddStoreAction copyDeep()- Specified by:
copyDeepin interfaceCartDiscountUpdateAction
-
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
-