Class SkuInventoryEndpoint

java.lang.Object
com.broadleafcommerce.inventory.web.endpoint.SkuInventoryEndpoint

@FrameworkRestController @FrameworkMapping("/sku-inventory") @DataRouteByKey("inventory") public class SkuInventoryEndpoint extends Object
REST Endpoint to allow for the creation, selection, and read of SkuInventory data, especially given an InventoryLocation.
Author:
Kelly Tisdell (ktisdell)
  • Field Details

  • Constructor Details

  • Method Details

    • readAllSkuInventory

      @FrameworkGetMapping @Policy(permissionRoots="INVENTORY") public org.springframework.data.domain.Page<SkuInventory> readAllSkuInventory(@RequestParam(value="q",required=false) String nameQuery, cz.jirutka.rsql.parser.ast.Node filters, @PageableDefault(size=50) org.springframework.data.domain.Pageable page, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • readSkuInventoryByContextId

      @FrameworkGetMapping("/{id}") @Policy(permissionRoots="INVENTORY") public SkuInventory readSkuInventoryByContextId(jakarta.servlet.http.HttpServletRequest request, @PathVariable("id") String id, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • delete

      @FrameworkDeleteMapping("/{id}") @Policy(permissionRoots="INVENTORY") public void delete(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(DELETE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @PathVariable("id") String id)
    • createSkuInventoryRecord

      @FrameworkPostMapping @Policy(permissionRoots="INVENTORY") public SkuInventory createSkuInventoryRecord(jakarta.servlet.http.HttpServletRequest request, @ContextOperation(CREATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody SkuInventory skuInventoryRecord)
    • updateSkuInventoryRecord

      @FrameworkPutMapping("/{id}") @Policy(permissionRoots="INVENTORY") public SkuInventory updateSkuInventoryRecord(jakarta.servlet.http.HttpServletRequest request, @PathVariable("id") String skuInventoryId, @ContextOperation(UPDATE) com.broadleafcommerce.data.tracking.core.context.ContextInfo context, @RequestBody SkuInventory skuInventoryRecord)
    • readConsolidatedAvailability

      @FrameworkGetMapping("/availability-summary") @Policy(permissionRoots="CONSOLIDATED_INVENTORY_AVAILABILITY") public ConsolidatedInventoryResponse readConsolidatedAvailability(jakarta.servlet.http.HttpServletRequest request, @RequestParam("skuCodes") Set<String> skuCodes, @RequestParam(value="minimumQuantity",defaultValue="1") int minimumQuantity, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(name="forPickup",defaultValue="true") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • readConsolidatedInventoryQuantities

      @FrameworkPostMapping("/available-quantities") @Policy(permissionRoots="CONSOLIDATED_INVENTORY_AVAILABILITY") public Map<String,Long> readConsolidatedInventoryQuantities(jakarta.servlet.http.HttpServletRequest request, @RequestBody SkuInventoryEndpoint.SkuCodesRequestBody skuCodesRequestBody, @RequestParam(name="forShipping",defaultValue="true") Boolean forShipping, @RequestParam(name="forPickup",defaultValue="true") Boolean forPickup, @RequestParam(required=false,name="inStore") Boolean inStore, @ContextOperation(READ) com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
    • getSkuInventoryService

      @NonNull protected SkuInventoryService<SkuInventory> getSkuInventoryService()
    • getTypeFactory

      @NonNull protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getSkuInventorySummaryService

      @NonNull protected SkuInventorySummaryService<SkuInventoryAvailabilitySummary> getSkuInventorySummaryService()