Interface InventoryConfiguration


public interface InventoryConfiguration

Inventory configuration settings for a Project.


Example to create an instance using the builder pattern

     InventoryConfiguration inventoryConfiguration = InventoryConfiguration.builder()
             .releaseExpiredReservations(true)
             .build()
 
  • Method Details

    • getReservationExpirationInMinutes

      Integer getReservationExpirationInMinutes()

      The number of minutes after which a Reservation expires. To use the ReserveOnCart inventory mode, this field must be set.

      Returns:
      reservationExpirationInMinutes
    • getReleaseExpiredReservations

      @NotNull @NotNull Boolean getReleaseExpiredReservations()

      If set to true, Reservations are marked as Expired once their reservationExpirationInMinutes is reached. The reserved inventory is then made available. If set to false, tracking Line Items with expired reservations becomes your responsibility.

      Returns:
      releaseExpiredReservations
    • setReservationExpirationInMinutes

      void setReservationExpirationInMinutes(Integer reservationExpirationInMinutes)

      The number of minutes after which a Reservation expires. To use the ReserveOnCart inventory mode, this field must be set.

      Parameters:
      reservationExpirationInMinutes - value to be set
    • setReleaseExpiredReservations

      void setReleaseExpiredReservations(Boolean releaseExpiredReservations)

      If set to true, Reservations are marked as Expired once their reservationExpirationInMinutes is reached. The reserved inventory is then made available. If set to false, tracking Line Items with expired reservations becomes your responsibility.

      Parameters:
      releaseExpiredReservations - value to be set
    • of

      factory method
      Returns:
      instance of InventoryConfiguration
    • of

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

    • deepCopy

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

      builder factory method for InventoryConfiguration
      Returns:
      builder
    • builder

      create builder for InventoryConfiguration instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryConfiguration

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