Interface CannotCreateReservationWarning

All Superinterfaces:
WarningObject

public interface CannotCreateReservationWarning extends WarningObject

Contained in responses to a Cart operation. Indicates that a reservation could not be created for the specified Product.


Example to create an instance using the builder pattern

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

    • CANNOT_CREATE_RESERVATION

      static final String CANNOT_CREATE_RESERVATION
      discriminator value for CannotCreateReservationWarning
      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 create a reservation for product $productId (SKU: $sku, Supply Channel: $supplyChannel) with quantity $quantity."

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

      @NotNull @NotNull String getProductId()

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

      Returns:
      productId
    • getSku

      String getSku()

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

      Returns:
      sku
    • getSupplyChannel

      String getSupplyChannel()

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

      Returns:
      supplyChannel
    • getQuantity

      @NotNull @NotNull Double getQuantity()

      The quantity for which the reservation could not be created.

      Returns:
      quantity
    • setMessage

      void setMessage(String message)

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

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

      void setProductId(String productId)

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

      Parameters:
      productId - value to be set
    • setSku

      void setSku(String sku)

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

      Parameters:
      sku - value to be set
    • setSupplyChannel

      void setSupplyChannel(String supplyChannel)

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

      Parameters:
      supplyChannel - value to be set
    • setQuantity

      void setQuantity(Double quantity)

      The quantity for which the reservation could not be created.

      Parameters:
      quantity - value to be set
    • of

      factory method
      Returns:
      instance of CannotCreateReservationWarning
    • of

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

      Specified by:
      copyDeep in interface WarningObject
    • deepCopy

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

      builder factory method for CannotCreateReservationWarning
      Returns:
      builder
    • builder

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

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