@ConditionalOnBroadleafModule(value=REST_API)
@RestController(value="blAdvancedInventoryEndpoint")
@RequestMapping(value="/inventory/",
produces={"application/json","application/xml"})
public class InventoryEndpoint
extends com.broadleafcommerce.rest.api.endpoint.BaseEndpoint
AdvancedInventoryService functionality| Modifier and Type | Field and Description |
|---|---|
protected org.broadleafcommerce.core.catalog.service.CatalogService |
catalogService |
protected AdvancedInventoryService |
inventoryService |
protected FulfillmentLocationService |
locationService |
| Constructor and Description |
|---|
InventoryEndpoint() |
| Modifier and Type | Method and Description |
|---|---|
List<InventoryWrapper> |
findInventoryForSku(javax.servlet.http.HttpServletRequest request,
Long skuId,
Long locationId) |
protected FulfillmentLocation |
findLocation(Long locationId) |
List<InventoryWrapper> |
findPhysicalInventoryForSku(javax.servlet.http.HttpServletRequest request,
Long skuId) |
List<InventoryWrapper> |
findPickupInventoryForSku(javax.servlet.http.HttpServletRequest request,
Long skuId) |
List<InventoryWrapper> |
findShippableInventoryForSku(javax.servlet.http.HttpServletRequest request,
Long skuId) |
protected org.broadleafcommerce.core.catalog.domain.Sku |
findSku(Long skuId)
Checks to see if the given Sku ID is valid
|
Integer |
getQuantityAvailable(javax.servlet.http.HttpServletRequest request,
Long skuId,
Long locationId) |
protected org.broadleafcommerce.core.catalog.service.CatalogService catalogService
protected AdvancedInventoryService inventoryService
protected FulfillmentLocationService locationService
@RequestMapping(value="{skuId}",
method=GET)
public List<InventoryWrapper> findInventoryForSku(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="skuId")
Long skuId,
@RequestParam(value="locationId")
Long locationId)
@RequestMapping(value="{skuId}/pickup",
method=GET)
public List<InventoryWrapper> findPickupInventoryForSku(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="skuId")
Long skuId)
@RequestMapping(value="{skuId}/shippable",
method=GET)
public List<InventoryWrapper> findShippableInventoryForSku(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="skuId")
Long skuId)
@RequestMapping(value="{skuId}/physical",
method=GET)
public List<InventoryWrapper> findPhysicalInventoryForSku(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="skuId")
Long skuId)
@RequestMapping(value="{skuId}/available",
method=GET)
public Integer getQuantityAvailable(javax.servlet.http.HttpServletRequest request,
@PathVariable(value="skuId")
Long skuId,
@RequestParam(value="locationId")
Long locationId)
protected org.broadleafcommerce.core.catalog.domain.Sku findSku(Long skuId)
skuId - the Sku primary key to checkSku looked up from the database{@link - BroadleafWebServicesException} if the Sku referenced by skuId is not foundprotected FulfillmentLocation findLocation(Long locationId)
Copyright © 2020. All rights reserved.