public interface InventoryProvider
| Modifier and Type | Method and Description |
|---|---|
Map<String,Boolean> |
isInventoryAvailable(Map<String,Integer> skuCodesWithQuantity,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Determines whether Inventory is available for a list of SKUs.
|
boolean |
isInventoryAvailable(String skuCode,
int quantity,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Determines whether Inventory is available for a particular SKU.
|
void |
reserveInventory(com.broadleafcommerce.cart.client.domain.Cart cart,
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Decrement or otherwise "reserve" inventory for a cart during checkout.
|
void reserveInventory(@NonNull
com.broadleafcommerce.cart.client.domain.Cart cart,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
cart - The cart for which to decrement inventory.contextInfo - Context information around sandbox and multitenant state.InventoryUnavailableException - if inventory is not available.boolean isInventoryAvailable(@NonNull
String skuCode,
int quantity,
@Nullable
com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
skuCode - the sku code for which to check inventory availabilityquantity - the quantity of the sku code that will be requestedcontextInfo - context information surrounding sandboxing and multitenant statetrue if inventory is available for the SKU and quantity, false
otherwiseMap<String,Boolean> isInventoryAvailable(@NonNull Map<String,Integer> skuCodesWithQuantity, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
skuCodesWithQuantity - a map of the sku codes and quantity for which to check inventory
availabilitycontextInfo - context information surrounding sandboxing and multitenant statetrue if inventory is available for the SKU and
quantity, and false otherwiseCopyright © 2021. All rights reserved.