Interface CartDiscountSetStoresAction
- All Superinterfaces:
CartDiscountUpdateAction,ResourceUpdateAction<CartDiscountUpdateAction>
If a referenced Store does not exist, a ReferencedResourceNotFound error is returned.
This action generates a CartDiscountStoresSet Message.
Example to create an instance using the builder pattern
CartDiscountSetStoresAction cartDiscountSetStoresAction = CartDiscountSetStoresAction.builder()
.plusStores(storesBuilder -> storesBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for CartDiscountSetStoresAction -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for CartDiscountSetStoresActionbuilder(CartDiscountSetStoresAction template) create builder for CartDiscountSetStoresAction instancecopyDeep()static CartDiscountSetStoresActiondeepCopy(CartDiscountSetStoresAction template) factory method to create a deep copy of CartDiscountSetStoresAction@NotNull @Valid List<StoreResourceIdentifier>Stores to set.static CartDiscountSetStoresActionof()factory methodstatic CartDiscountSetStoresActionof(CartDiscountSetStoresAction template) factory method to create a shallow copy CartDiscountSetStoresActionvoidsetStores(StoreResourceIdentifier... stores) Stores to set.voidsetStores(List<StoreResourceIdentifier> stores) Stores to set.static com.fasterxml.jackson.core.type.TypeReference<CartDiscountSetStoresAction>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
-
SET_STORES
discriminator value for CartDiscountSetStoresAction- See Also:
-
-
Method Details
-
getStores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
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:
- stores
-
setStores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
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:
stores- values to be set
-
setStores
Stores to set. Overrides the current list of Stores. If empty, any existing values will be removed.
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:
stores- values to be set
-
of
factory method- Returns:
- instance of CartDiscountSetStoresAction
-
of
factory method to create a shallow copy CartDiscountSetStoresAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
CartDiscountSetStoresAction copyDeep()- Specified by:
copyDeepin interfaceCartDiscountUpdateAction
-
deepCopy
@Nullable static CartDiscountSetStoresAction deepCopy(@Nullable CartDiscountSetStoresAction template) factory method to create a deep copy of CartDiscountSetStoresAction- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for CartDiscountSetStoresAction- Returns:
- builder
-
builder
create builder for CartDiscountSetStoresAction instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withCartDiscountSetStoresAction
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
-