Interface GraphQLLineItemQuantityBelowLimitError
- All Superinterfaces:
GraphQLErrorObject
Returned when attempting to create or update a Cart with a Line Item whose quantity is below the minCartQuantity limit defined in the InventoryEntry for that Line Item's SKU.
Example to create an instance using the builder pattern
GraphQLLineItemQuantityBelowLimitError graphQLLineItemQuantityBelowLimitError = GraphQLLineItemQuantityBelowLimitError.builder()
.quantity(1)
.minCartQuantity(1)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLLineItemQuantityBelowLimitError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLLineItemQuantityBelowLimitErrorcreate builder for GraphQLLineItemQuantityBelowLimitError instancecopyDeep()factory method to create a deep copy of GraphQLLineItemQuantityBelowLimitError@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 minimum quantity required for this Line Item.@NotNull IntegerThe quantity that was requested.of()factory methodof(GraphQLLineItemQuantityBelowLimitError template) factory method to create a shallow copy GraphQLLineItemQuantityBelowLimitErrorvoidsetLineItem(String lineItem) Reference to the Line Item that caused the error.voidsetMinCartQuantity(Integer minCartQuantity) The minimum quantity required for this Line Item.voidsetQuantity(Integer quantity) The quantity that was requested.static com.fasterxml.jackson.core.type.TypeReference<GraphQLLineItemQuantityBelowLimitError>gives a TypeReference for usage with Jackson DataBinddefault <T> TwithGraphQLLineItemQuantityBelowLimitError(Function<GraphQLLineItemQuantityBelowLimitError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.GraphQLErrorObject
setValue, values, withGraphQLErrorObject
-
Field Details
-
LINE_ITEM_QUANTITY_BELOW_LIMIT
discriminator value for GraphQLLineItemQuantityBelowLimitError- 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
-
getMinCartQuantity
The minimum quantity required for this Line Item.
- Returns:
- minCartQuantity
-
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
-
setMinCartQuantity
The minimum quantity required for this Line Item.
- Parameters:
minCartQuantity- 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 GraphQLLineItemQuantityBelowLimitError
-
of
factory method to create a shallow copy GraphQLLineItemQuantityBelowLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
GraphQLLineItemQuantityBelowLimitError copyDeep()- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
deepCopy
@Nullable static GraphQLLineItemQuantityBelowLimitError deepCopy(@Nullable GraphQLLineItemQuantityBelowLimitError template) factory method to create a deep copy of GraphQLLineItemQuantityBelowLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLLineItemQuantityBelowLimitError- Returns:
- builder
-
builder
static GraphQLLineItemQuantityBelowLimitErrorBuilder builder(GraphQLLineItemQuantityBelowLimitError template) create builder for GraphQLLineItemQuantityBelowLimitError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLLineItemQuantityBelowLimitError
default <T> T withGraphQLLineItemQuantityBelowLimitError(Function<GraphQLLineItemQuantityBelowLimitError, 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<GraphQLLineItemQuantityBelowLimitError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-