Interface GraphQLLineItemQuantityAboveLimitError
- All Superinterfaces:
GraphQLErrorObject
Returned when attempting to create or update a Cart with a Line Item whose quantity exceeds the maxCartQuantity limit defined in the InventoryEntry for that Line Item's SKU.
Example to create an instance using the builder pattern
GraphQLLineItemQuantityAboveLimitError graphQLLineItemQuantityAboveLimitError = GraphQLLineItemQuantityAboveLimitError.builder()
.quantity(1)
.maxCartQuantity(1)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLLineItemQuantityAboveLimitError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLLineItemQuantityAboveLimitErrorcreate builder for GraphQLLineItemQuantityAboveLimitError instancecopyDeep()factory method to create a deep copy of GraphQLLineItemQuantityAboveLimitError@NotNull StringgetCode()One of the error codes that is listed on the Errors page.Reference to the Line Item that caused the error.@NotNull IntegerThe maximum quantity allowed for this Line Item.@NotNull IntegerThe quantity that was requested.of()factory methodof(GraphQLLineItemQuantityAboveLimitError template) factory method to create a shallow copy GraphQLLineItemQuantityAboveLimitErrorvoidsetLineItem(String lineItem) Reference to the Line Item that caused the error.voidsetMaxCartQuantity(Integer maxCartQuantity) The maximum quantity allowed for this Line Item.voidsetQuantity(Integer quantity) The quantity that was requested.static com.fasterxml.jackson.core.type.TypeReference<GraphQLLineItemQuantityAboveLimitError>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithGraphQLLineItemQuantityAboveLimitError(Function<GraphQLLineItemQuantityAboveLimitError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
LINE_ITEM_QUANTITY_ABOVE_LIMIT
discriminator value for GraphQLLineItemQuantityAboveLimitError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein interfaceGraphQLErrorObject- Returns:
- code
-
getQuantity
The quantity that was requested.
- Returns:
- quantity
-
getMaxCartQuantity
The maximum quantity allowed for this Line Item.
- Returns:
- maxCartQuantity
-
getLineItem
String getLineItem()Reference to the Line Item that caused the error.
- Returns:
- lineItem
-
setQuantity
The quantity that was requested.
- Parameters:
quantity- value to be set
-
setMaxCartQuantity
The maximum quantity allowed for this Line Item.
- Parameters:
maxCartQuantity- value to be set
-
setLineItem
Reference to the Line Item that caused the error.
- Parameters:
lineItem- value to be set
-
of
factory method- Returns:
- instance of GraphQLLineItemQuantityAboveLimitError
-
of
factory method to create a shallow copy GraphQLLineItemQuantityAboveLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
GraphQLLineItemQuantityAboveLimitError copyDeep()- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
deepCopy
@Nullable static GraphQLLineItemQuantityAboveLimitError deepCopy(@Nullable GraphQLLineItemQuantityAboveLimitError template) factory method to create a deep copy of GraphQLLineItemQuantityAboveLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLLineItemQuantityAboveLimitError- Returns:
- builder
-
builder
static GraphQLLineItemQuantityAboveLimitErrorBuilder builder(GraphQLLineItemQuantityAboveLimitError template) create builder for GraphQLLineItemQuantityAboveLimitError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLLineItemQuantityAboveLimitError
default <T> T withGraphQLLineItemQuantityAboveLimitError(Function<GraphQLLineItemQuantityAboveLimitError, 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<GraphQLLineItemQuantityAboveLimitError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-