Interface GraphQLMaxCartDiscountsReachedError
- All Superinterfaces:
GraphQLErrorObject
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
GraphQLMaxCartDiscountsReachedError graphQLMaxCartDiscountsReachedError = GraphQLMaxCartDiscountsReachedError.builder()
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLMaxCartDiscountsReachedError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLMaxCartDiscountsReachedErrorbuilder
(GraphQLMaxCartDiscountsReachedError template) create builder for GraphQLMaxCartDiscountsReachedError instancedeepCopy
(GraphQLMaxCartDiscountsReachedError template) factory method to create a deep copy of GraphQLMaxCartDiscountsReachedError@NotNull String
getCode()
Error identifier.of()
factory methodof
(GraphQLMaxCartDiscountsReachedError template) factory method to create a shallow copy GraphQLMaxCartDiscountsReachedErrorstatic com.fasterxml.jackson.core.type.TypeReference<GraphQLMaxCartDiscountsReachedError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
MAX_CART_DISCOUNTS_REACHED
discriminator value for GraphQLMaxCartDiscountsReachedError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObject
Error identifier.
- Specified by:
getCode
in interfaceGraphQLErrorObject
- Returns:
- code
-
of
factory method- Returns:
- instance of GraphQLMaxCartDiscountsReachedError
-
of
factory method to create a shallow copy GraphQLMaxCartDiscountsReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
@Nullable static GraphQLMaxCartDiscountsReachedError deepCopy(@Nullable GraphQLMaxCartDiscountsReachedError template) factory method to create a deep copy of GraphQLMaxCartDiscountsReachedError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLMaxCartDiscountsReachedError- Returns:
- builder
-
builder
static GraphQLMaxCartDiscountsReachedErrorBuilder builder(GraphQLMaxCartDiscountsReachedError template) create builder for GraphQLMaxCartDiscountsReachedError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLMaxCartDiscountsReachedError
default <T> T withGraphQLMaxCartDiscountsReachedError(Function<GraphQLMaxCartDiscountsReachedError, 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<GraphQLMaxCartDiscountsReachedError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-