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
FieldsModifier and TypeFieldDescriptionstatic final Stringdiscriminator value for GraphQLOutOfStockError -
Method Summary
Modifier and TypeMethodDescriptionbuilder()builder factory method for GraphQLOutOfStockErrorbuilder(GraphQLOutOfStockError template) create builder for GraphQLOutOfStockError instancecopyDeep()static GraphQLOutOfStockErrordeepCopy(GraphQLOutOfStockError template) factory method to create a deep copy of GraphQLOutOfStockError@NotNull StringgetCode()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 GraphQLOutOfStockErrorof()factory methodstatic GraphQLOutOfStockErrorof(GraphQLOutOfStockError template) factory method to create a shallow copy GraphQLOutOfStockErrorvoidsetLineItems(String... lineItems) Unique identifiers of the Line Items that are out of stock.voidsetLineItems(List<String> lineItems) Unique identifiers of the Line Items that are out of stock.voidSKUs of the Line Items that are out of stock.voidSKUs 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> Taccessor 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:GraphQLErrorObjectOne of the error codes that is listed on the Errors page.
- Specified by:
getCodein 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
-
copyDeep
GraphQLOutOfStockError copyDeep()- Specified by:
copyDeepin interfaceGraphQLErrorObject
-
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
-