Class TmaCartsController

java.lang.Object
de.hybris.platform.b2ctelcoocc.controllers.BaseController
de.hybris.platform.b2ctelcoocc.controllers.TmaCartsController

@Controller @RequestMapping("/{baseSiteId}/users/{userId}/carts") public class TmaCartsController extends BaseController
Controller for cart related requests such as retrieving/delete/update/... a cart
Since:
1911
  • Constructor Details

    • TmaCartsController

      public TmaCartsController()
  • Method Details

    • getCarts

      @RequestMapping(method=GET) @ResponseBody public CartListWsDTO getCarts(@RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(defaultValue="false") boolean savedCartsOnly, @RequestParam(defaultValue="0") int currentPage, @RequestParam(defaultValue="20") int pageSize, @RequestParam(required=false) String sort)
    • getCart

      @RequestMapping(value="/{cartId}", method=GET) @ResponseBody public CartWsDTO getCart(@PathVariable("cartId") String cartId, @PathVariable("userId") String userId, @RequestParam(defaultValue="DEFAULT") String fields)
    • createCartEntry

      @RequestMapping(value="/{cartId}/entries", method=POST, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO createCartEntry(@PathVariable("cartId") String cartId, @PathVariable("userId") String userId, @PathVariable String baseSiteId, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • createCart

      @RequestMapping(method=POST) @ResponseStatus(CREATED) @ResponseBody public CartWsDTO createCart(@RequestParam(required=false) String oldCartId, @RequestParam(required=false) String toMergeCartGuid, @PathVariable("userId") String userId, @RequestParam(defaultValue="DEFAULT") String fields)
    • removeCartEntry

      @RequestMapping(value="/{cartId}/entries/{entryNumber}", method=DELETE) @ResponseStatus(OK) public void removeCartEntry(@PathVariable long entryNumber, @PathVariable("cartId") String cartId, @PathVariable("userId") String userId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • updateCartEntry

      @RequestMapping(value="/{cartId}/entries/{entryNumber}", method=PATCH, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO updateCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields, @PathVariable("cartId") String cartId, @PathVariable("userId") String userId) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • getCartEntry

      @RequestMapping(value="/{cartId}/entries/{entryNumber}", method=GET) @ResponseBody public OrderEntryWsDTO getCartEntry(@PathVariable long entryNumber, @RequestParam(defaultValue="DEFAULT") String fields)
    • replaceCartEntry

      @RequestMapping(value="/{cartId}/entries/{entryNumber}", method=PUT, consumes={"application/json","application/xml"}) @ResponseBody public CartModificationWsDTO replaceCartEntry(@PathVariable String baseSiteId, @PathVariable long entryNumber, @RequestBody OrderEntryWsDTO entry, @RequestParam(defaultValue="DEFAULT") String fields) throws de.hybris.platform.commerceservices.order.CommerceCartModificationException
      Throws:
      de.hybris.platform.commerceservices.order.CommerceCartModificationException
    • initBinder

      @InitBinder public void initBinder(org.springframework.web.bind.WebDataBinder binder)