public interface InventoryService
| Modifier and Type | Method and Description |
|---|---|
void |
decrementInventory(Map<Sku,Integer> skuQuantities)
Attempts to decrement inventory for a map of Skus and quantities.
|
void |
decrementInventory(Sku sku,
int quantity)
Attempts to decrement inventory if it is available.
|
void |
incrementInventory(Map<Sku,Integer> skuQuantities)
Attempts to increment inventory for a map of Skus and quantities.
|
void |
incrementInventory(Sku sku,
int quantity)
Attempts to increment inventory.
|
boolean |
isAvailable(Sku sku,
int quantity)
Indicates whether the given quantity is available for the particular skuId.
|
Map<Sku,Integer> |
retrieveQuantitiesAvailable(Set<Sku> skus)
Retrieves the quantities available for a set of Skus.
|
Integer |
retrieveQuantityAvailable(Sku sku)
Retrieves the quantity available for a particular sku.
|
Integer retrieveQuantityAvailable(Sku sku)
skuId - Map<Sku,Integer> retrieveQuantitiesAvailable(Set<Sku> skus)
skuIds - boolean isAvailable(Sku sku, int quantity)
skuId - quantity - void decrementInventory(Sku sku, int quantity) throws InventoryUnavailableException
InventoryType.ALWAYS_AVAILABLE
then this is a no-op.skuId - quantity - InventoryUnavailableExceptionvoid decrementInventory(Map<Sku,Integer> skuQuantities) throws InventoryUnavailableException
skuQuantities - InventoryUnavailableExceptionvoid incrementInventory(Sku sku, int quantity)
skuId - quantity - Copyright © 2014. All Rights Reserved.