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 of
SkuInventory
.- Author:
- Kelly Tisdell (ktisdell)
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSkuInventoryShopEndpoint
(SkuInventoryService<SkuInventory> skuInventoryService, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService) -
Method Summary
Modifier and TypeMethodDescriptioncreateInventoryReservation
(jakarta.servlet.http.HttpServletRequest request, SkuInventoryReservationRequest reservationRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) findBulkInventoryAvailability
(jakarta.servlet.http.HttpServletRequest request, List<SkuInventoryAvailabilityRequest> skuReferences, String skuFieldType, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) findInventoryAvailability
(jakarta.servlet.http.HttpServletRequest request, String skuFieldType, String skuReference, int minAvailableQuantity, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) findInventoryAvailability
(jakarta.servlet.http.HttpServletRequest request, String skuFieldType, List<String> skuFieldReferences, Boolean forShipping, Boolean forPickup, Boolean inStore, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) findInventoryAvailabilityForLocation
(jakarta.servlet.http.HttpServletRequest request, String skuFieldType, String skuFieldReferences, String inventoryLocationId, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) protected SkuInventoryService<SkuInventory>
releaseInventoryReservation
(jakarta.servlet.http.HttpServletRequest request, ReleaseSkuInventoryReservationRequest releaseRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
-
Field Details
-
SHOP_SKU_INVENTORY_URI
- See Also:
-
-
Constructor Details
-
SkuInventoryShopEndpoint
public SkuInventoryShopEndpoint(SkuInventoryService<SkuInventory> skuInventoryService, SkuInventorySummaryService<SkuInventoryAvailabilitySummary> skuInventorySummaryService)
-
-
Method Details
-
findInventoryAvailability
@FrameworkGetMapping("/availability") @Policy(permissionRoots="INVENTORY_SUMMARY") public List<SkuInventoryAvailabilitySummary> findInventoryAvailability(jakarta.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(jakarta.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(jakarta.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(jakarta.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(jakarta.servlet.http.HttpServletRequest request, @RequestBody SkuInventoryReservationRequest reservationRequest, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) throws InventoryUnavailableException - Throws:
InventoryUnavailableException
-
releaseInventoryReservation
@FrameworkPostMapping("/release-reservation") @Policy(permissionRoots="INVENTORY_RESERVATION") public ReleaseSkuInventoryReservationResponse releaseInventoryReservation(jakarta.servlet.http.HttpServletRequest request, @RequestBody ReleaseSkuInventoryReservationRequest releaseRequest, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context) -
getSkuInventoryService
-
getSkuInventorySummaryService
@NonNull protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary> getSkuInventorySummaryService()
-