Interface MaxStoreReferencesReachedError
- All Superinterfaces:
ErrorObject
Returned when a Store cannot be added to a Cart Discount as the limit for Stores configured for a Cart Discount has been reached.
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
MaxStoreReferencesReachedError maxStoreReferencesReachedError = MaxStoreReferencesReachedError.builder()
.message("{message}")
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for MaxStoreReferencesReachedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for MaxStoreReferencesReachedErrorbuilder
(MaxStoreReferencesReachedError template) create builder for MaxStoreReferencesReachedError instancedeepCopy
(MaxStoreReferencesReachedError template) factory method to create a deep copy of MaxStoreReferencesReachedError@NotNull String
getCode()
Error identifier.@NotNull String
"Maximum number of store discounts on a single cart discount reached $max".
of()
factory methodof
(MaxStoreReferencesReachedError template) factory method to create a shallow copy MaxStoreReferencesReachedErrorvoid
setMessage
(String message) "Maximum number of store discounts on a single cart discount reached $max".
static com.fasterxml.jackson.core.type.TypeReference<MaxStoreReferencesReachedError>
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_STORE_REFERENCES_REACHED
discriminator value for MaxStoreReferencesReachedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
"Maximum number of store discounts on a single cart discount reached $max".
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
"Maximum number of store discounts on a single cart discount reached $max".
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of MaxStoreReferencesReachedError
-
of
factory method to create a shallow copy MaxStoreReferencesReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static MaxStoreReferencesReachedError deepCopy(@Nullable MaxStoreReferencesReachedError template) factory method to create a deep copy of MaxStoreReferencesReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for MaxStoreReferencesReachedError- Returns:
- builder
-
builder
create builder for MaxStoreReferencesReachedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withMaxStoreReferencesReachedError
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<MaxStoreReferencesReachedError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-