Interface CannotUpdateReservationWarning

All Superinterfaces:
WarningObject

public interface CannotUpdateReservationWarning extends WarningObject

Contained in responses to a Cart operation. Indicates that the reservation for a Line Item could not be updated to the requested quantity. The existing reserved amount remains unchanged.


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()
 
  • Field Details

    • CANNOT_UPDATE_RESERVATION

      static final String CANNOT_UPDATE_RESERVATION
      discriminator value for CannotUpdateReservationWarning
      See Also:
  • Method Details

    • getCode

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

      Identifier for the type of warning.

      Specified by:
      getCode in interface WarningObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull 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."

      Specified by:
      getMessage in interface WarningObject
      Returns:
      message
    • getLineItemId

      @NotNull @NotNull String getLineItemId()

      The ID of the Line Item.

      Returns:
      lineItemId
    • getRequestedQuantity

      @NotNull @NotNull Double getRequestedQuantity()

      The quantity that was requested for the Line Item.

      Returns:
      requestedQuantity
    • getReservedQuantity

      @NotNull @NotNull Double getReservedQuantity()

      The quantity that remains reserved for the Line Item.

      Returns:
      reservedQuantity
    • getProductId

      @NotNull @NotNull String getProductId()

      The ID of the Product associated with the Line Item.

      Returns:
      productId
    • getSku

      String getSku()

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

      Returns:
      sku
    • getSupplyChannel

      String getSupplyChannel()

      The ID of the Supply Channel associated with the reservation.

      Returns:
      supplyChannel
    • setMessage

      void setMessage(String 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."

      Specified by:
      setMessage in interface WarningObject
      Parameters:
      message - value to be set
    • setLineItemId

      void setLineItemId(String lineItemId)

      The ID of the Line Item.

      Parameters:
      lineItemId - value to be set
    • setRequestedQuantity

      void setRequestedQuantity(Double requestedQuantity)

      The quantity that was requested for the Line Item.

      Parameters:
      requestedQuantity - value to be set
    • setReservedQuantity

      void setReservedQuantity(Double reservedQuantity)

      The quantity that remains reserved for the Line Item.

      Parameters:
      reservedQuantity - value to be set
    • setProductId

      void setProductId(String productId)

      The ID of the Product associated with the Line Item.

      Parameters:
      productId - value to be set
    • setSku

      void setSku(String sku)

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

      Parameters:
      sku - value to be set
    • setSupplyChannel

      void setSupplyChannel(String supplyChannel)

      The ID of the Supply Channel associated with the reservation.

      Parameters:
      supplyChannel - value to be set
    • of

      factory method
      Returns:
      instance of CannotUpdateReservationWarning
    • of

      factory method to create a shallow copy CannotUpdateReservationWarning
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • copyDeep

      Specified by:
      copyDeep in interface WarningObject
    • deepCopy

      @Nullable static CannotUpdateReservationWarning deepCopy(@Nullable CannotUpdateReservationWarning template)
      factory method to create a deep copy of CannotUpdateReservationWarning
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for CannotUpdateReservationWarning
      Returns:
      builder
    • builder

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

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