Interface InventoryService

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.concurrent.CompletionStage<java.util.Optional<com.commercetools.api.models.inventory.InventoryEntry>> createInventoryEntry​(com.commercetools.api.models.inventory.InventoryEntryDraft inventoryEntryDraft)
      Creates new inventory entry from inventoryEntryDraft.
      java.util.concurrent.CompletionStage<java.util.Set<com.commercetools.api.models.inventory.InventoryEntry>> fetchInventoryEntriesByIdentifiers​(java.util.Set<InventoryEntryIdentifier> inventoryEntryIdentifiers)
      Queries existing InventoryEntry's against set of sku and supply channels.
      java.util.concurrent.CompletionStage<com.commercetools.api.models.inventory.InventoryEntry> updateInventoryEntry​(com.commercetools.api.models.inventory.InventoryEntry inventoryEntry, java.util.List<com.commercetools.api.models.inventory.InventoryEntryUpdateAction> updateActions)
      Updates existing inventory entry with updateActions.
    • Method Detail

      • fetchInventoryEntriesByIdentifiers

        @Nonnull
        java.util.concurrent.CompletionStage<java.util.Set<com.commercetools.api.models.inventory.InventoryEntry>> fetchInventoryEntriesByIdentifiers​(@Nonnull
                                                                                                                                                      java.util.Set<InventoryEntryIdentifier> inventoryEntryIdentifiers)
        Queries existing InventoryEntry's against set of sku and supply channels.
        Parameters:
        inventoryEntryIdentifiers - Set of unique inventory identifiers, used in search predicate
        Returns:
        List of matching entries or empty list when there was no matching resources.
      • createInventoryEntry

        @Nonnull
        java.util.concurrent.CompletionStage<java.util.Optional<com.commercetools.api.models.inventory.InventoryEntry>> createInventoryEntry​(@Nonnull
                                                                                                                                             com.commercetools.api.models.inventory.InventoryEntryDraft inventoryEntryDraft)
        Creates new inventory entry from inventoryEntryDraft.
        Parameters:
        inventoryEntryDraft - draft with data for new inventory entry
        Returns:
        CompletionStage with created InventoryEntry or an exception
      • updateInventoryEntry

        @Nonnull
        java.util.concurrent.CompletionStage<com.commercetools.api.models.inventory.InventoryEntry> updateInventoryEntry​(@Nonnull
                                                                                                                         com.commercetools.api.models.inventory.InventoryEntry inventoryEntry,
                                                                                                                         @Nonnull
                                                                                                                         java.util.List<com.commercetools.api.models.inventory.InventoryEntryUpdateAction> updateActions)
        Updates existing inventory entry with updateActions.
        Parameters:
        inventoryEntry - entry that should be updated
        updateActions - List of actions that should be applied to inventoryEntry
        Returns:
        CompletionStage with updated InventoryEntry or an exception