Package com.commercetools.sync.services
Interface InventoryService
-
- All Known Implementing Classes:
InventoryServiceImpl
public interface InventoryService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>>
createInventoryEntry(io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
Creates new inventory entry frominventoryEntryDraft
.java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>>
fetchInventoryEntriesBySkus(java.util.Set<java.lang.String> skus)
Queries existingInventoryEntry
's against set of skus.java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntry>
updateInventoryEntry(io.sphere.sdk.inventory.InventoryEntry inventoryEntry, java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> updateActions)
Updates existing inventory entry withupdateActions
.
-
-
-
Method Detail
-
fetchInventoryEntriesBySkus
@Nonnull java.util.concurrent.CompletionStage<java.util.Set<io.sphere.sdk.inventory.InventoryEntry>> fetchInventoryEntriesBySkus(@Nonnull java.util.Set<java.lang.String> skus)
Queries existingInventoryEntry
's against set of skus.- Parameters:
skus
-Set
of sku values, used in search predicate- Returns:
List
of matching entries or empty list when there was no entry of sku matching toskus
.
-
createInventoryEntry
@Nonnull java.util.concurrent.CompletionStage<java.util.Optional<io.sphere.sdk.inventory.InventoryEntry>> createInventoryEntry(@Nonnull io.sphere.sdk.inventory.InventoryEntryDraft inventoryEntryDraft)
Creates new inventory entry frominventoryEntryDraft
.- Parameters:
inventoryEntryDraft
- draft with data for new inventory entry- Returns:
CompletionStage
with createdInventoryEntry
or an exception
-
updateInventoryEntry
@Nonnull java.util.concurrent.CompletionStage<io.sphere.sdk.inventory.InventoryEntry> updateInventoryEntry(@Nonnull io.sphere.sdk.inventory.InventoryEntry inventoryEntry, @Nonnull java.util.List<io.sphere.sdk.commands.UpdateAction<io.sphere.sdk.inventory.InventoryEntry>> updateActions)
Updates existing inventory entry withupdateActions
.- Parameters:
inventoryEntry
- entry that should be updatedupdateActions
-List
of actions that should be applied toinventoryEntry
- Returns:
CompletionStage
with updatedInventoryEntry
or an exception
-
-