Class GraphQLOutOfStockErrorBuilder

java.lang.Object
com.commercetools.api.models.error.GraphQLOutOfStockErrorBuilder
All Implemented Interfaces:
Builder<GraphQLOutOfStockError>

public class GraphQLOutOfStockErrorBuilder extends Object implements Builder<GraphQLOutOfStockError>
GraphQLOutOfStockErrorBuilder
Example to create an instance using the builder pattern

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

    • GraphQLOutOfStockErrorBuilder

      public GraphQLOutOfStockErrorBuilder()
  • Method Details

    • values

      Error-specific additional fields.

      Parameters:
      values - properties to be set
      Returns:
      Builder
    • addValue

      public GraphQLOutOfStockErrorBuilder addValue(String key, Object value)

      Error-specific additional fields.

      Parameters:
      key - property name
      value - property value
      Returns:
      Builder
    • lineItems

      public GraphQLOutOfStockErrorBuilder lineItems(String... lineItems)

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

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • lineItems

      public GraphQLOutOfStockErrorBuilder lineItems(List<String> lineItems)

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

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • plusLineItems

      public GraphQLOutOfStockErrorBuilder plusLineItems(String... lineItems)

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

      Parameters:
      lineItems - value to be set
      Returns:
      Builder
    • skus

      public GraphQLOutOfStockErrorBuilder skus(String... skus)

      SKUs of the Line Items that are out of stock.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • skus

      SKUs of the Line Items that are out of stock.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • plusSkus

      public GraphQLOutOfStockErrorBuilder plusSkus(String... skus)

      SKUs of the Line Items that are out of stock.

      Parameters:
      skus - value to be set
      Returns:
      Builder
    • getValues

      public Map<String,Object> getValues()

      Error-specific additional fields.

      Returns:
      pattern properties
    • getLineItems

      public List<String> getLineItems()

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

      Returns:
      lineItems
    • getSkus

      public List<String> getSkus()

      SKUs of the Line Items that are out of stock.

      Returns:
      skus
    • build

      public GraphQLOutOfStockError build()
      builds GraphQLOutOfStockError with checking for non-null required values
      Specified by:
      build in interface Builder<GraphQLOutOfStockError>
      Returns:
      GraphQLOutOfStockError
    • buildUnchecked

      public GraphQLOutOfStockError buildUnchecked()
      builds GraphQLOutOfStockError without checking for non-null required values
      Returns:
      GraphQLOutOfStockError
    • of

      public static GraphQLOutOfStockErrorBuilder of()
      factory method for an instance of GraphQLOutOfStockErrorBuilder
      Returns:
      builder
    • of

      create builder for GraphQLOutOfStockError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder