Interface GraphQLOutOfStockError
- All Superinterfaces:
GraphQLErrorObject
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, Create Order from Quote, and Create Order by Import requests on Orders.
- Create Order from Cart, Create Order in Store from Cart, and Create Order from Quote requests on My Orders.
- Create Order from Cart in BusinessUnit and Create Order from Quote in BusinessUnit requests on Associate Orders.
Example to create an instance using the builder pattern
GraphQLOutOfStockError graphQLOutOfStockError = GraphQLOutOfStockError.builder()
.plusLineItems(lineItemsBuilder -> lineItemsBuilder)
.plusSkus(skusBuilder -> skusBuilder)
.build()
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
discriminator value for GraphQLOutOfStockError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for GraphQLOutOfStockErrorbuilder
(GraphQLOutOfStockError template) create builder for GraphQLOutOfStockError instancestatic GraphQLOutOfStockError
deepCopy
(GraphQLOutOfStockError template) factory method to create a deep copy of GraphQLOutOfStockError@NotNull String
getCode()
One of the error codes that is listed on the Errors page.Unique identifiers of the Line Items that are out of stock.getSkus()
SKUs of the Line Items that are out of stock.static GraphQLOutOfStockError
of()
factory methodstatic GraphQLOutOfStockError
of
(GraphQLOutOfStockError template) factory method to create a shallow copy GraphQLOutOfStockErrorvoid
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
SKUs of the Line Items that are out of stock.void
SKUs of the Line Items that are out of stock.static com.fasterxml.jackson.core.type.TypeReference<GraphQLOutOfStockError>
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
-
OUT_OF_STOCK
discriminator value for GraphQLOutOfStockError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:GraphQLErrorObject
One of the error codes that is listed on the Errors page.
- Specified by:
getCode
in interfaceGraphQLErrorObject
- Returns:
- code
-
getLineItems
Unique identifiers of the Line Items that are out of stock.
- Returns:
- lineItems
-
getSkus
SKUs of the Line Items that are out of stock.
- Returns:
- skus
-
setLineItems
Unique identifiers of the Line Items that are out of stock.
- Parameters:
lineItems
- values to be set
-
setLineItems
Unique identifiers of the Line Items that are out of stock.
- Parameters:
lineItems
- values to be set
-
setSkus
SKUs of the Line Items that are out of stock.
- Parameters:
skus
- values to be set
-
setSkus
SKUs of the Line Items that are out of stock.
- Parameters:
skus
- values to be set
-
of
factory method- Returns:
- instance of GraphQLOutOfStockError
-
of
factory method to create a shallow copy GraphQLOutOfStockError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of GraphQLOutOfStockError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for GraphQLOutOfStockError- Returns:
- builder
-
builder
create builder for GraphQLOutOfStockError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withGraphQLOutOfStockError
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-