Interface GraphQLStoreCartDiscountsLimitReachedError
- All Superinterfaces:
GraphQLErrorObject
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
GraphQLStoreCartDiscountsLimitReachedError graphQLStoreCartDiscountsLimitReachedError = GraphQLStoreCartDiscountsLimitReachedError.builder()
.plusStores(storesBuilder -> storesBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLStoreCartDiscountsLimitReachedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLStoreCartDiscountsLimitReachedErrorcreate builder for GraphQLStoreCartDiscountsLimitReachedError instancefactory method to create a deep copy of GraphQLStoreCartDiscountsLimitReachedError@NotNull String
getCode()
One of the error codes that is listed on the Errors page.@NotNull @Valid List<StoreKeyReference>
Stores for which the limit for active Cart Discounts that can exist has been reached.of()
factory methodof
(GraphQLStoreCartDiscountsLimitReachedError template) factory method to create a shallow copy GraphQLStoreCartDiscountsLimitReachedErrorvoid
setStores
(StoreKeyReference... stores) Stores for which the limit for active Cart Discounts that can exist has been reached.void
setStores
(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<GraphQLStoreCartDiscountsLimitReachedError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withGraphQLStoreCartDiscountsLimitReachedError
(Function<GraphQLStoreCartDiscountsLimitReachedError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
STORE_CART_DISCOUNTS_LIMIT_REACHED
discriminator value for GraphQLStoreCartDiscountsLimitReachedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObject
One of the error codes that is listed on the Errors page.
- Specified by:
getCode
in interfaceGraphQLErrorObject
- Returns:
- code
-
getStores
Stores for which the limit for active Cart Discounts that can exist has been reached.
- Returns:
- stores
-
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 GraphQLStoreCartDiscountsLimitReachedError
-
of
static GraphQLStoreCartDiscountsLimitReachedError of(GraphQLStoreCartDiscountsLimitReachedError template) factory method to create a shallow copy GraphQLStoreCartDiscountsLimitReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static GraphQLStoreCartDiscountsLimitReachedError deepCopy(@Nullable GraphQLStoreCartDiscountsLimitReachedError template) factory method to create a deep copy of GraphQLStoreCartDiscountsLimitReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLStoreCartDiscountsLimitReachedError- Returns:
- builder
-
builder
static GraphQLStoreCartDiscountsLimitReachedErrorBuilder builder(GraphQLStoreCartDiscountsLimitReachedError template) create builder for GraphQLStoreCartDiscountsLimitReachedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLStoreCartDiscountsLimitReachedError
default <T> T withGraphQLStoreCartDiscountsLimitReachedError(Function<GraphQLStoreCartDiscountsLimitReachedError, 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<GraphQLStoreCartDiscountsLimitReachedError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-