Interface MaxCartDiscountsReachedError
- All Superinterfaces:
ErrorObject
Returned when a Cart Discount cannot be created or activated as the limit for active Cart Discounts has been reached.
The error is returned as a failed response to:
- Create CartDiscount and Create CartDiscount in Store requests
- Change IsActive update action
Example to create an instance using the builder pattern
MaxCartDiscountsReachedError maxCartDiscountsReachedError = MaxCartDiscountsReachedError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MaxCartDiscountsReachedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MaxCartDiscountsReachedErrorbuilder
(MaxCartDiscountsReachedError template) create builder for MaxCartDiscountsReachedError instancestatic MaxCartDiscountsReachedError
deepCopy
(MaxCartDiscountsReachedError template) factory method to create a deep copy of MaxCartDiscountsReachedError@NotNull String
getCode()
Error identifier.@NotNull String
"Maximum number of active cart discounts reached ($max)."
static MaxCartDiscountsReachedError
of()
factory methodstatic MaxCartDiscountsReachedError
of
(MaxCartDiscountsReachedError template) factory method to create a shallow copy MaxCartDiscountsReachedErrorvoid
setMessage
(String message) "Maximum number of active cart discounts reached ($max)."
static com.fasterxml.jackson.core.type.TypeReference<MaxCartDiscountsReachedError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
MAX_CART_DISCOUNTS_REACHED
discriminator value for MaxCartDiscountsReachedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Maximum number of active cart discounts reached ($max)."
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
"Maximum number of active cart discounts reached ($max)."
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of MaxCartDiscountsReachedError
-
of
factory method to create a shallow copy MaxCartDiscountsReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static MaxCartDiscountsReachedError deepCopy(@Nullable MaxCartDiscountsReachedError template) factory method to create a deep copy of MaxCartDiscountsReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MaxCartDiscountsReachedError- Returns:
- builder
-
builder
create builder for MaxCartDiscountsReachedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMaxCartDiscountsReachedError
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
-