public final class InventoryUpdateActionUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> |
buildChangeQuantityAction(io.sphere.sdk.inventory.InventoryEntry oldEntry,
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
Compares the
quantityOnStock values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"changeQuantity" UpdateAction. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> |
buildSetExpectedDeliveryAction(io.sphere.sdk.inventory.InventoryEntry oldEntry,
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
Compares the
expectedDelivery values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setExpectedDelivery" UpdateAction. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> |
buildSetRestockableInDaysAction(io.sphere.sdk.inventory.InventoryEntry oldEntry,
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
Compares the
restockableInDays values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setRestockableInDays" UpdateAction. |
static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> |
buildSetSupplyChannelAction(io.sphere.sdk.inventory.InventoryEntry oldEntry,
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
Compares the
supplyChannels of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setSupplyChannel" UpdateAction. |
@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> buildChangeQuantityAction(@Nonnull
io.sphere.sdk.inventory.InventoryEntry oldEntry,
@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
quantityOnStock values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"changeQuantity" UpdateAction. If both InventoryEntry and InventoryEntryDraft have the same quantityOnStock values, then no update action is
needed and empty optional will be returned. If the quantityOnStock from the newEntry is null, the new quantityOnStock will have a value of 0L.oldEntry - the inventory entry that should be updatednewEntry - the inventory entry draft which contains new quantity on stock@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> buildSetRestockableInDaysAction(@Nonnull
io.sphere.sdk.inventory.InventoryEntry oldEntry,
@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
restockableInDays values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setRestockableInDays" UpdateAction. If both InventoryEntry and the
InventoryEntryDraft have the same restockableInDays values, then no update
action is needed and empty optional will be returned.oldEntry - the inventory entry that should be updatednewEntry - the inventory entry draft which contains a new restockableInDays value@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> buildSetExpectedDeliveryAction(@Nonnull
io.sphere.sdk.inventory.InventoryEntry oldEntry,
@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
expectedDelivery values of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setExpectedDelivery" UpdateAction. If both InventoryEntry and InventoryEntryDraft have the same expectedDelivery values, then no update action is
needed and empty optional will be returned.oldEntry - the inventory entry that should be updatednewEntry - the inventory entry draft which contains new expected delivery@Nonnull
public static java.util.Optional<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> buildSetSupplyChannelAction(@Nonnull
io.sphere.sdk.inventory.InventoryEntry oldEntry,
@Nonnull
io.sphere.sdk.inventory.InventoryEntryDraft newEntry)
supplyChannels of an InventoryEntry and an InventoryEntryDraft and returns an Optional of update action, which would contain the
"setSupplyChannel" UpdateAction. If both InventoryEntry and InventoryEntryDraft have the same supply channel, then no update action is needed and empty
optional will be returned.oldEntry - the inventory entry that should be updatednewEntry - the inventory entry draft which contains new supply channel