Interface InventoryProvider
- All Known Implementing Classes:
ExternalInventoryProvider
public interface InventoryProvider
Provider for interfacing with operations around inventory. Typically utilizes
WebClient
to make requests to an external REST API.-
Method Summary
Modifier and TypeMethodDescription<P extends Product>
Collection<P>determineProductsInventoryAvailability(Collection<P> products, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) getInventoryAvailabilityForSkus(Map<String, Integer> skus, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns the inventory availability for the provided skus and requested quantity.
-
Method Details
-
determineProductsInventoryAvailability
<P extends Product> Collection<P> determineProductsInventoryAvailability(Collection<P> products, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) - Parameters:
products- The products to check inventory forcontextInfo- Context information around sandbox and multitenant state.- Returns:
- The products with inventory availability hydrated
-
getInventoryAvailabilityForSkus
List<SkuInventoryAvailabilitySummary> getInventoryAvailabilityForSkus(Map<String, Integer> skus, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Returns the inventory availability for the provided skus and requested quantity.- Parameters:
skus- The product or variant skus to check inventory forcontextInfo- Context information around sandbox and multitenant state.- Returns:
- The products with inventory availability hydrated
- Since:
- Catalog Browse Service 2.2.0, Release Train 2.3.0
-