Class OutOfStockErrorImpl
java.lang.Object
com.commercetools.api.models.error.OutOfStockErrorImpl
- All Implemented Interfaces:
ErrorObject
,OutOfStockError
,io.vrap.rmf.base.client.ModelBase
public class OutOfStockErrorImpl
extends Object
implements OutOfStockError, io.vrap.rmf.base.client.ModelBase
Returned when some of the Line Items are out of stock at the time of placing an Order.
The error is returned as a failed response to:
- Create Order from Cart, Create Order in Store from Cart, and Create Order by Import requests on Orders.
- Create Order from Cart and Create Order in Store from Cart requests on My Orders.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.vrap.rmf.base.client.ModelBase
io.vrap.rmf.base.client.ModelBase.FilteredRecursiveToStringStyle
-
Field Summary
Fields inherited from interface com.commercetools.api.models.error.OutOfStockError
OUT_OF_STOCK
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
getCode()
Error identifier.Unique identifiers of the Line Items that are out of stock."Some line items are out of stock at the time of placing the order: $itemSku."
getSkus()
SKUs of the Line Items that are out of stock.int
hashCode()
void
setLineItems
(String... lineItems) Unique identifiers of the Line Items that are out of stock.void
setLineItems
(List<String> lineItems) Unique identifiers of the Line Items that are out of stock.void
setMessage
(String message) "Some line items are out of stock at the time of placing the order: $itemSku."
void
SKUs of the Line Items that are out of stock.void
SKUs of the Line Items that are out of stock.void
Error-specific additional fields.values()
Error-specific additional fields.Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.commercetools.api.models.error.ErrorObject
withErrorObject
Methods inherited from interface io.vrap.rmf.base.client.ModelBase
reflectionString, reflectionString
Methods inherited from interface com.commercetools.api.models.error.OutOfStockError
withOutOfStockError
-
Constructor Details
-
OutOfStockErrorImpl
public OutOfStockErrorImpl()create empty instance
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Specified by:
getCode
in interfaceOutOfStockError
- Returns:
- code
-
getMessage
"Some line items are out of stock at the time of placing the order: $itemSku."
- Specified by:
getMessage
in interfaceErrorObject
- Specified by:
getMessage
in interfaceOutOfStockError
- Returns:
- message
-
values
Error-specific additional fields.
- Specified by:
values
in interfaceErrorObject
- Returns:
- map of the pattern property values
-
getLineItems
Unique identifiers of the Line Items that are out of stock.
- Specified by:
getLineItems
in interfaceOutOfStockError
- Returns:
- lineItems
-
getSkus
SKUs of the Line Items that are out of stock.
- Specified by:
getSkus
in interfaceOutOfStockError
- Returns:
- skus
-
setMessage
Description copied from interface:OutOfStockError
"Some line items are out of stock at the time of placing the order: $itemSku."
- Specified by:
setMessage
in interfaceErrorObject
- Specified by:
setMessage
in interfaceOutOfStockError
- Parameters:
message
- value to be set
-
setValue
Description copied from interface:ErrorObject
Error-specific additional fields.
- Specified by:
setValue
in interfaceErrorObject
- Parameters:
key
- property namevalue
- property value
-
setLineItems
Description copied from interface:OutOfStockError
Unique identifiers of the Line Items that are out of stock.
- Specified by:
setLineItems
in interfaceOutOfStockError
- Parameters:
lineItems
- values to be set
-
setLineItems
Description copied from interface:OutOfStockError
Unique identifiers of the Line Items that are out of stock.
- Specified by:
setLineItems
in interfaceOutOfStockError
- Parameters:
lineItems
- values to be set
-
setSkus
Description copied from interface:OutOfStockError
SKUs of the Line Items that are out of stock.
- Specified by:
setSkus
in interfaceOutOfStockError
- Parameters:
skus
- values to be set
-
setSkus
Description copied from interface:OutOfStockError
SKUs of the Line Items that are out of stock.
- Specified by:
setSkus
in interfaceOutOfStockError
- Parameters:
skus
- values to be set
-
equals
-
hashCode
-