Class SkuInventoryShopEndpoint
- java.lang.Object
-
- com.broadleafcommerce.inventory.web.endpoint.SkuInventoryShopEndpoint
-
@FrameworkRestController @FrameworkMapping("/shop-sku-inventory") @DataRouteByKey("inventory") public class SkuInventoryShopEndpoint extends Object
REST Endpoint to allow for the browsing and reservation ofSkuInventory
.- Author:
- Kelly Tisdell (ktisdell)
-
-
Field Summary
Fields Modifier and Type Field Description static String
SHOP_SKU_INVENTORY_URI
-
Constructor Summary
Constructors Constructor Description SkuInventoryShopEndpoint(SkuInventoryService<SkuInventory> skuInventoryService, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SkuInventoryReservationResponse
createInventoryReservation(javax.servlet.http.HttpServletRequest request, SkuInventoryReservationRequest reservationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
List<SkuInventoryAvailabilitySummary>
findBulkInventoryAvailability(javax.servlet.http.HttpServletRequest request, List<SkuInventoryAvailabilityRequest> skuReferences, String skuFieldType, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
SkuInventoryAvailabilitySummary
findInventoryAvailability(javax.servlet.http.HttpServletRequest request, String skuFieldType, String skuReference, int minAvailableQuantity, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
List<SkuInventoryAvailabilitySummary>
findInventoryAvailability(javax.servlet.http.HttpServletRequest request, String skuFieldType, List<String> skuFieldReferences, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
List<SkuInventoryAvailabilitySummary>
findInventoryAvailabilityForLocation(javax.servlet.http.HttpServletRequest request, String skuFieldType, String skuFieldReferences, String inventoryLocationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
protected SkuInventoryService<SkuInventory>
getSkuInventoryService()
protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary>
getSkuInventorySummaryService()
-
-
-
Field Detail
-
SHOP_SKU_INVENTORY_URI
public static final String SHOP_SKU_INVENTORY_URI
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SkuInventoryShopEndpoint
public SkuInventoryShopEndpoint(SkuInventoryService<SkuInventory> skuInventoryService, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService)
-
-
Method Detail
-
findInventoryAvailability
@FrameworkGetMapping("/availability") @Policy(permissionRoots="INVENTORY_SUMMARY") public List<SkuInventoryAvailabilitySummary> findInventoryAvailability(javax.servlet.http.HttpServletRequest request, @RequestParam(name="skuFieldType",defaultValue="SKU_CODE") String skuFieldType, @RequestParam("skuFieldReferences") List<String> skuFieldReferences, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(required=false,name="forPickup") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
findInventoryAvailability
@FrameworkGetMapping("/availability/sku-reference") @Policy(permissionRoots="INVENTORY_SUMMARY") public SkuInventoryAvailabilitySummary findInventoryAvailability(javax.servlet.http.HttpServletRequest request, @RequestParam(name="skuFieldType",defaultValue="SKU_CODE") String skuFieldType, @RequestParam("skuReference") String skuReference, @RequestParam(name="minAvailableQuantity",defaultValue="1") int minAvailableQuantity, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(required=false,name="forPickup") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
findBulkInventoryAvailability
@FrameworkPostMapping("/availability/sku-references") @Policy(permissionRoots="INVENTORY_SUMMARY") public List<SkuInventoryAvailabilitySummary> findBulkInventoryAvailability(javax.servlet.http.HttpServletRequest request, @RequestBody List<SkuInventoryAvailabilityRequest> skuReferences, @RequestParam(name="skuFieldType",defaultValue="SKU_CODE") String skuFieldType, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(required=false,name="forPickup") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
findInventoryAvailabilityForLocation
@FrameworkGetMapping("/availability/inventory-location/{locationId}") @Policy(permissionRoots="INVENTORY_SUMMARY") public List<SkuInventoryAvailabilitySummary> findInventoryAvailabilityForLocation(javax.servlet.http.HttpServletRequest request, @RequestParam(name="skuFieldType",defaultValue="SKU_CODE") String skuFieldType, @RequestParam("skuReferences") String skuFieldReferences, @PathVariable(name="locationId") String inventoryLocationId, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
createInventoryReservation
@FrameworkPostMapping("/reservation") @Policy(permissionRoots="INVENTORY_RESERVATION") public SkuInventoryReservationResponse createInventoryReservation(javax.servlet.http.HttpServletRequest request, @RequestBody SkuInventoryReservationRequest reservationRequest, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) throws InventoryUnavailableException
- Throws:
InventoryUnavailableException
-
getSkuInventoryService
@NonNull protected SkuInventoryService<SkuInventory> getSkuInventoryService()
-
getSkuInventorySummaryService
@NonNull protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary> getSkuInventorySummaryService()
-
-