Interface StoreCartDiscountsLimitReachedError
- All Superinterfaces:
ErrorObject
Returned when a Cart Discount cannot be created or assigned to a Store as the limit for active Cart Discounts in a Store has been reached for one or more Stores in the request.
The error is returned as a failed response to:
- Create CartDiscount and Create CartDiscount in Store requests
- Add Store and Set Store update actions
Example to create an instance using the builder pattern
StoreCartDiscountsLimitReachedError storeCartDiscountsLimitReachedError = StoreCartDiscountsLimitReachedError.builder()
.message("{message}")
.plusStores(storesBuilder -> storesBuilder)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for StoreCartDiscountsLimitReachedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for StoreCartDiscountsLimitReachedErrorbuilder(StoreCartDiscountsLimitReachedError template) create builder for StoreCartDiscountsLimitReachedError instancecopyDeep()deepCopy(StoreCartDiscountsLimitReachedError template) factory method to create a deep copy of StoreCartDiscountsLimitReachedError@NotNull StringgetCode()Error identifier.@NotNull String"Maximum number of active cart discounts reached for $stores."@NotNull @Valid List<StoreKeyReference>Stores for which the limit for active Cart Discounts that can exist has been reached.of()factory methodof(StoreCartDiscountsLimitReachedError template) factory method to create a shallow copy StoreCartDiscountsLimitReachedErrorvoidsetMessage(String message) "Maximum number of active cart discounts reached for $stores."voidsetStores(StoreKeyReference... stores) Stores for which the limit for active Cart Discounts that can exist has been reached.voidsetStores(List<StoreKeyReference> stores) Stores for which the limit for active Cart Discounts that can exist has been reached.static com.fasterxml.jackson.core.type.TypeReference<StoreCartDiscountsLimitReachedError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
STORE_CART_DISCOUNTS_LIMIT_REACHED
discriminator value for StoreCartDiscountsLimitReachedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Maximum number of active cart discounts reached for $stores."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
getStores
Stores for which the limit for active Cart Discounts that can exist has been reached.
- Returns:
- stores
-
setMessage
"Maximum number of active cart discounts reached for $stores."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
setStores
Stores for which the limit for active Cart Discounts that can exist has been reached.
- Parameters:
stores- values to be set
-
setStores
Stores for which the limit for active Cart Discounts that can exist has been reached.
- Parameters:
stores- values to be set
-
of
factory method- Returns:
- instance of StoreCartDiscountsLimitReachedError
-
of
factory method to create a shallow copy StoreCartDiscountsLimitReachedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
StoreCartDiscountsLimitReachedError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static StoreCartDiscountsLimitReachedError deepCopy(@Nullable StoreCartDiscountsLimitReachedError template) factory method to create a deep copy of StoreCartDiscountsLimitReachedError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for StoreCartDiscountsLimitReachedError- Returns:
- builder
-
builder
static StoreCartDiscountsLimitReachedErrorBuilder builder(StoreCartDiscountsLimitReachedError template) create builder for StoreCartDiscountsLimitReachedError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withStoreCartDiscountsLimitReachedError
default <T> T withStoreCartDiscountsLimitReachedError(Function<StoreCartDiscountsLimitReachedError, T> helper) accessor map function- Type Parameters:
T- mapped type- Parameters:
helper- function to map the object- Returns:
- mapped value
-
typeReference
static com.fasterxml.jackson.core.type.TypeReference<StoreCartDiscountsLimitReachedError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-