Class CannotCreateReservationWarningBuilder

java.lang.Object
com.commercetools.api.models.warning.CannotCreateReservationWarningBuilder
All Implemented Interfaces:
Builder<CannotCreateReservationWarning>

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

     CannotCreateReservationWarning cannotCreateReservationWarning = CannotCreateReservationWarning.builder()
             .message("{message}")
             .productId("{productId}")
             .quantity(0.3)
             .build()
 
  • Constructor Details

    • CannotCreateReservationWarningBuilder

      public CannotCreateReservationWarningBuilder()
  • Method Details

    • message

      "Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."

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

      public CannotCreateReservationWarningBuilder productId(String productId)

      The ID of the Product for which the reservation could not be created.

      Parameters:
      productId - value to be set
      Returns:
      Builder
    • sku

      public CannotCreateReservationWarningBuilder sku(@Nullable String sku)

      The SKU of the Product Variant for which the reservation could not be created.

      Parameters:
      sku - value to be set
      Returns:
      Builder
    • supplyChannel

      public CannotCreateReservationWarningBuilder supplyChannel(@Nullable String supplyChannel)

      The ID of the Supply Channel for which the reservation could not be created.

      Parameters:
      supplyChannel - value to be set
      Returns:
      Builder
    • quantity

      public CannotCreateReservationWarningBuilder quantity(Double quantity)

      The quantity for which the reservation could not be created.

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

      public String getMessage()

      "Failed to create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."

      Returns:
      message
    • getProductId

      public String getProductId()

      The ID of the Product for which the reservation could not be created.

      Returns:
      productId
    • getSku

      @Nullable public String getSku()

      The SKU of the Product Variant for which the reservation could not be created.

      Returns:
      sku
    • getSupplyChannel

      @Nullable public String getSupplyChannel()

      The ID of the Supply Channel for which the reservation could not be created.

      Returns:
      supplyChannel
    • getQuantity

      public Double getQuantity()

      The quantity for which the reservation could not be created.

      Returns:
      quantity
    • build

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

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

      factory method for an instance of CannotCreateReservationWarningBuilder
      Returns:
      builder
    • of

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