Class InventorySyncUtils
- java.lang.Object
 - 
- com.commercetools.sync.inventories.utils.InventorySyncUtils
 
 
- 
public final class InventorySyncUtils extends java.lang.ObjectThis class provides factory methods for assembling update actions of inventory entries. 
- 
- 
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>>buildActions(io.sphere.sdk.inventory.InventoryEntry oldEntry, io.sphere.sdk.inventory.InventoryEntryDraft newEntry, InventorySyncOptions syncOptions)Compares the quantityOnStock, the restockableInDays, the expectedDelivery, the supply channel and Custom fields/ type fields of anInventoryEntryand anInventoryEntryDraft. 
 - 
 
- 
- 
Method Detail
- 
buildActions
@Nonnull public static java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> buildActions(@Nonnull io.sphere.sdk.inventory.InventoryEntry oldEntry, @Nonnull io.sphere.sdk.inventory.InventoryEntryDraft newEntry, @Nonnull InventorySyncOptions syncOptions)Compares the quantityOnStock, the restockableInDays, the expectedDelivery, the supply channel and Custom fields/ type fields of anInventoryEntryand anInventoryEntryDraft. It returns aListofUpdateAction<InventoryEntry> as a result. If no update action is needed an emptyListis returned.- Parameters:
 oldEntry- the inventory entry which should be updatednewEntry- the inventory entry draft that contains new data that should be applied tooldEntrysyncOptions- the sync options wrapper which contains options related to the sync process supplied by the user. For example, custom callbacks to call in case of warnings or errors occurring on the build update action process. And other options (SeeBaseSyncOptionsfor more info.- Returns:
 - list containing 
UpdateActionthat need to be performed onoldEntryresource so that it will be synced withnewEntryor empty list when both entries are already in sync. 
 
 - 
 
 -