Interface InventoryQuantityValue


public interface InventoryQuantityValue
InventoryQuantityValue
Example to create an instance using the builder pattern

     InventoryQuantityValue inventoryQuantityValue = InventoryQuantityValue.builder()
             .quantityOnStock(1)
             .availableQuantity(1)
             .build()
 
  • Method Details

    • getQuantityOnStock

      @NotNull @NotNull Integer getQuantityOnStock()

      Overall amount of stock (availableQuantity + reserved).

      Returns:
      quantityOnStock
    • getAvailableQuantity

      @NotNull @NotNull Integer getAvailableQuantity()

      Available amount of stock (quantityOnStock - reserved).

      Returns:
      availableQuantity
    • setQuantityOnStock

      void setQuantityOnStock(Integer quantityOnStock)

      Overall amount of stock (availableQuantity + reserved).

      Parameters:
      quantityOnStock - value to be set
    • setAvailableQuantity

      void setAvailableQuantity(Integer availableQuantity)

      Available amount of stock (quantityOnStock - reserved).

      Parameters:
      availableQuantity - value to be set
    • of

      factory method
      Returns:
      instance of InventoryQuantityValue
    • of

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

      factory method to create a deep copy of InventoryQuantityValue
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for InventoryQuantityValue
      Returns:
      builder
    • builder

      create builder for InventoryQuantityValue instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryQuantityValue

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