Interface InventoryEntryQuantitySetMessage

All Superinterfaces:
BaseResource, DomainResource<Message>, Identifiable<Message>, Message, Versioned<Message>

public interface InventoryEntryQuantitySetMessage extends Message

Generated after a successful Add Quantity, Remove Quantity or Change Quantity update action. Inventory changes as a result of Order creation do not trigger this message.


Example to create an instance using the builder pattern

     InventoryEntryQuantitySetMessage inventoryEntryQuantitySetMessage = InventoryEntryQuantitySetMessage.builder()
             .id("{id}")
             .version(0.3)
             .createdAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .lastModifiedAt(ZonedDateTime.parse("2022-01-01T12:00:00.301Z"))
             .sequenceNumber(0.3)
             .resource(resourceBuilder -> resourceBuilder)
             .resourceVersion(0.3)
             .oldQuantityOnStock(0.3)
             .newQuantityOnStock(0.3)
             .oldAvailableQuantity(0.3)
             .newAvailableQuantity(0.3)
             .build()
 
  • Field Details

    • INVENTORY_ENTRY_QUANTITY_SET

      static final String INVENTORY_ENTRY_QUANTITY_SET
      discriminator value for InventoryEntryQuantitySetMessage
      See Also:
  • Method Details

    • getOldQuantityOnStock

      @NotNull @NotNull Long getOldQuantityOnStock()

      Quantity on stock for the InventoryEntry before the quantity was updated.

      Returns:
      oldQuantityOnStock
    • getNewQuantityOnStock

      @NotNull @NotNull Long getNewQuantityOnStock()

      Quantity on stock for the InventoryEntry after the quantity was updated.

      Returns:
      newQuantityOnStock
    • getOldAvailableQuantity

      @NotNull @NotNull Long getOldAvailableQuantity()

      Available quantity for the InventoryEntry before the quantity was updated.

      Returns:
      oldAvailableQuantity
    • getNewAvailableQuantity

      @NotNull @NotNull Long getNewAvailableQuantity()

      Available quantity for the InventoryEntry after the quantity was updated.

      Returns:
      newAvailableQuantity
    • getSupplyChannel

      @Valid @Valid ChannelReference getSupplyChannel()

      Reference to the Channel where the InventoryEntry quantity was set.

      Returns:
      supplyChannel
    • setOldQuantityOnStock

      void setOldQuantityOnStock(Long oldQuantityOnStock)

      Quantity on stock for the InventoryEntry before the quantity was updated.

      Parameters:
      oldQuantityOnStock - value to be set
    • setNewQuantityOnStock

      void setNewQuantityOnStock(Long newQuantityOnStock)

      Quantity on stock for the InventoryEntry after the quantity was updated.

      Parameters:
      newQuantityOnStock - value to be set
    • setOldAvailableQuantity

      void setOldAvailableQuantity(Long oldAvailableQuantity)

      Available quantity for the InventoryEntry before the quantity was updated.

      Parameters:
      oldAvailableQuantity - value to be set
    • setNewAvailableQuantity

      void setNewAvailableQuantity(Long newAvailableQuantity)

      Available quantity for the InventoryEntry after the quantity was updated.

      Parameters:
      newAvailableQuantity - value to be set
    • setSupplyChannel

      void setSupplyChannel(ChannelReference supplyChannel)

      Reference to the Channel where the InventoryEntry quantity was set.

      Parameters:
      supplyChannel - value to be set
    • of

      factory method
      Returns:
      instance of InventoryEntryQuantitySetMessage
    • of

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

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

      builder factory method for InventoryEntryQuantitySetMessage
      Returns:
      builder
    • builder

      create builder for InventoryEntryQuantitySetMessage instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withInventoryEntryQuantitySetMessage

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