Class OutOfStockErrorBuilder

java.lang.Object
com.commercetools.api.models.error.OutOfStockErrorBuilder
All Implemented Interfaces:
io.vrap.rmf.base.client.Builder<OutOfStockError>

public class OutOfStockErrorBuilder extends Object implements io.vrap.rmf.base.client.Builder<OutOfStockError>
OutOfStockErrorBuilder
Example to create an instance using the builder pattern

     OutOfStockError outOfStockError = OutOfStockError.builder()
             .message("{message}")
             .plusLineItems(lineItemsBuilder -> lineItemsBuilder)
             .plusSkus(skusBuilder -> skusBuilder)
             .build()
 
  • Constructor Details

  • Method Details

    • message

      "Some line items are out of stock at the time of placing the order: $itemSku."

      Parameters:
      message - value to be set
      Returns:
      Builder
    • values

      Error-specific additional fields.

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

      Error-specific additional fields.

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

      public OutOfStockErrorBuilder lineItems(String... lineItems)

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

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

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

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

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

      Parameters:
      lineItems - 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
    • skus

      SKUs of the Line Items that are out of stock.

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

      SKUs of the Line Items that are out of stock.

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

      public String getMessage()

      "Some line items are out of stock at the time of placing the order: $itemSku."

      Returns:
      message
    • getValues

      Error-specific additional fields.

      Returns:
      pattern properties
    • 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

      builds OutOfStockError with checking for non-null required values
      Specified by:
      build in interface io.vrap.rmf.base.client.Builder<OutOfStockError>
      Returns:
      OutOfStockError
    • buildUnchecked

      builds OutOfStockError without checking for non-null required values
      Returns:
      OutOfStockError
    • of

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

      public static OutOfStockErrorBuilder of(OutOfStockError template)
      create builder for OutOfStockError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder