Interface LineItemQuantityBelowLimitError
- All Superinterfaces:
ErrorObject
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
LineItemQuantityBelowLimitError lineItemQuantityBelowLimitError = LineItemQuantityBelowLimitError.builder()
.message("{message}")
.quantity(1)
.minCartQuantity(1)
.build()
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for LineItemQuantityBelowLimitError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for LineItemQuantityBelowLimitErrorbuilder(LineItemQuantityBelowLimitError template) create builder for LineItemQuantityBelowLimitError instancecopyDeep()deepCopy(LineItemQuantityBelowLimitError template) factory method to create a deep copy of LineItemQuantityBelowLimitError@NotNull StringgetCode()Error identifier.Reference to the Line Item that caused the error.@NotNull String"Quantity '$quantity' less than minimum '$minCartQuantity'."@NotNull IntegerThe minimum quantity required for this Line Item.@NotNull IntegerThe quantity that was requested.of()factory methodof(LineItemQuantityBelowLimitError template) factory method to create a shallow copy LineItemQuantityBelowLimitErrorvoidsetLineItem(String lineItem) Reference to the Line Item that caused the error.voidsetMessage(String message) "Quantity '$quantity' less than minimum '$minCartQuantity'."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<LineItemQuantityBelowLimitError>gives a TypeReference for usage with Jackson DataBinddefault <T> Taccessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
LINE_ITEM_QUANTITY_BELOW_LIMIT
discriminator value for LineItemQuantityBelowLimitError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObjectError identifier.
- Specified by:
getCodein interfaceErrorObject- Returns:
- code
-
getMessage
"Quantity '$quantity' less than minimum '$minCartQuantity'."- Specified by:
getMessagein interfaceErrorObject- Returns:
- message
-
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
-
setMessage
"Quantity '$quantity' less than minimum '$minCartQuantity'."- Specified by:
setMessagein interfaceErrorObject- Parameters:
message- value to be set
-
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 LineItemQuantityBelowLimitError
-
of
factory method to create a shallow copy LineItemQuantityBelowLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
copyDeep
LineItemQuantityBelowLimitError copyDeep()- Specified by:
copyDeepin interfaceErrorObject
-
deepCopy
@Nullable static LineItemQuantityBelowLimitError deepCopy(@Nullable LineItemQuantityBelowLimitError template) factory method to create a deep copy of LineItemQuantityBelowLimitError- Parameters:
template- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for LineItemQuantityBelowLimitError- Returns:
- builder
-
builder
create builder for LineItemQuantityBelowLimitError instance- Parameters:
template- instance with prefilled values for the builder- Returns:
- builder
-
withLineItemQuantityBelowLimitError
default <T> T withLineItemQuantityBelowLimitError(Function<LineItemQuantityBelowLimitError, 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<LineItemQuantityBelowLimitError> typeReference()gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-