Class CannotUpdateReservationWarningBuilder

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

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

     CannotUpdateReservationWarning cannotUpdateReservationWarning = CannotUpdateReservationWarning.builder()
             .message("{message}")
             .lineItemId("{lineItemId}")
             .requestedQuantity(0.3)
             .reservedQuantity(0.3)
             .productId("{productId}")
             .build()
 
  • Constructor Details

    • CannotUpdateReservationWarningBuilder

      public CannotUpdateReservationWarningBuilder()
  • Method Details

    • message

      "Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity. The reserved amount is still $reservedQuantity."

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

      public CannotUpdateReservationWarningBuilder lineItemId(String lineItemId)

      The ID of the Line Item.

      Parameters:
      lineItemId - value to be set
      Returns:
      Builder
    • requestedQuantity

      public CannotUpdateReservationWarningBuilder requestedQuantity(Double requestedQuantity)

      The quantity that was requested for the Line Item.

      Parameters:
      requestedQuantity - value to be set
      Returns:
      Builder
    • reservedQuantity

      public CannotUpdateReservationWarningBuilder reservedQuantity(Double reservedQuantity)

      The quantity that remains reserved for the Line Item.

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

      public CannotUpdateReservationWarningBuilder productId(String productId)

      The ID of the Product associated with the Line Item.

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

      public CannotUpdateReservationWarningBuilder sku(@Nullable String sku)

      The SKU of the Product Variant associated with the Line Item.

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

      public CannotUpdateReservationWarningBuilder supplyChannel(@Nullable String supplyChannel)

      The ID of the Supply Channel associated with the reservation.

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

      public String getMessage()

      "Failed to update the reservation for line item $lineItemId (Product ID: $productId, SKU: $sku, Supply Channel: $supplyChannel) to a quantity of $requestedQuantity. The reserved amount is still $reservedQuantity."

      Returns:
      message
    • getLineItemId

      public String getLineItemId()

      The ID of the Line Item.

      Returns:
      lineItemId
    • getRequestedQuantity

      public Double getRequestedQuantity()

      The quantity that was requested for the Line Item.

      Returns:
      requestedQuantity
    • getReservedQuantity

      public Double getReservedQuantity()

      The quantity that remains reserved for the Line Item.

      Returns:
      reservedQuantity
    • getProductId

      public String getProductId()

      The ID of the Product associated with the Line Item.

      Returns:
      productId
    • getSku

      @Nullable public String getSku()

      The SKU of the Product Variant associated with the Line Item.

      Returns:
      sku
    • getSupplyChannel

      @Nullable public String getSupplyChannel()

      The ID of the Supply Channel associated with the reservation.

      Returns:
      supplyChannel
    • build

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

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

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

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