Interface GraphQLOutOfStockError

All Superinterfaces:
GraphQLErrorObject

public interface GraphQLOutOfStockError extends 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, and Create Order by Import requests on Orders.
  • Create Order from Cart and Create Order in Store from Cart requests on My Orders.

Example to create an instance using the builder pattern

     GraphQLOutOfStockError graphQLOutOfStockError = GraphQLOutOfStockError.builder()
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .plusSkus(skusBuilder -> skusBuilder)
             .build()
 
  • Field Details

  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: GraphQLErrorObject

      Error identifier.

      Specified by:
      getCode in interface GraphQLErrorObject
      Returns:
      code
    • getLineItems

      @NotNull @NotNull List<String> getLineItems()

      Unique identifiers of the Line Items that are out of stock.

      Returns:
      lineItems
    • getSkus

      @NotNull @NotNull List<String> getSkus()

      SKUs of the Line Items that are out of stock.

      Returns:
      skus
    • setLineItems

      void setLineItems(String... lineItems)

      Unique identifiers of the Line Items that are out of stock.

      Parameters:
      lineItems - values to be set
    • setLineItems

      void setLineItems(List<String> lineItems)

      Unique identifiers of the Line Items that are out of stock.

      Parameters:
      lineItems - values to be set
    • setSkus

      void setSkus(String... skus)

      SKUs of the Line Items that are out of stock.

      Parameters:
      skus - values to be set
    • setSkus

      void setSkus(List<String> skus)

      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

      default <T> T withGraphQLOutOfStockError(Function<GraphQLOutOfStockError,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<GraphQLOutOfStockError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference