Class CartPromotionsController
java.lang.Object
de.hybris.platform.commercewebservices.core.v2.controller.BaseController
de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
de.hybris.platform.commercewebservices.core.v2.controller.CartPromotionsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/carts")
public class CartPromotionsController
extends BaseCommerceController
-
Field Summary
Fields inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
API_COMPATIBILITY_B2C_CHANNELS, ENTRYFields inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseController
BASIC_FIELD_SET, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, HEADER_TOTAL_COUNT, INVALID_REQUEST_BODY_ERROR_MESSAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoApplyCartPromotion(String promotionId) voiddoApplyCartVoucher(String voucherId, javax.servlet.http.HttpServletRequest request) getCartPromotion(String promotionId, String fields) getCartPromotions(String fields) getCartVouchers(String fields) voidremoveCartPromotion(String promotionId) voidremoveCartVoucher(String voucherId) Methods inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseCommerceController
addPaymentDetailsInternal, applyVoucherForCartInternal, applyVoucherForCartInternal, createAddressInternal, createAddressInternal, getAddressDTOValidator, getAddressValidator, getCartFacade, getCartVoucherValidator, getCcPaymentInfoValidator, getCheckoutFacade, getDeliveryAddressValidator, getHttpRequestAddressDataPopulator, getHttpRequestPaymentInfoPopulator, getPaymentDetailsDTOValidator, getSessionCart, getUserFacade, getVoucherFacade, setAddressDTOValidator, setAddressValidator, setCartDeliveryAddressInternal, setCartDeliveryModeInternal, setCartFacade, setCcPaymentInfoValidator, setCheckoutFacade, setDeliveryAddressValidator, setHttpRequestAddressDataPopulator, setHttpRequestPaymentInfoPopulator, setPaymentDetailsDTOValidator, setPaymentDetailsInternal, setUserFacade, setVoucherFacade, validateCartForPlaceOrder, validateStatusesEnumValueMethods inherited from class de.hybris.platform.commercewebservices.core.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
Constructor Details
-
CartPromotionsController
public CartPromotionsController()
-
-
Method Details
-
getCartPromotions
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/{cartId}/promotions") @ResponseBody public PromotionResultListWsDTO getCartPromotions(@RequestParam(defaultValue="DEFAULT") String fields) -
getCartPromotion
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/{cartId}/promotions/{promotionId}") @ResponseBody public PromotionResultListWsDTO getCartPromotion(@PathVariable String promotionId, @RequestParam(defaultValue="DEFAULT") String fields) -
doApplyCartPromotion
@Secured("ROLE_TRUSTED_CLIENT") @PostMapping("/{cartId}/promotions") @ResponseStatus(OK) public void doApplyCartPromotion(@RequestParam(required=true) String promotionId) throws CommercePromotionRestrictionException -
removeCartPromotion
@Secured("ROLE_TRUSTED_CLIENT") @DeleteMapping("/{cartId}/promotions/{promotionId}") @ResponseStatus(OK) public void removeCartPromotion(@PathVariable String promotionId) throws CommercePromotionRestrictionException -
getCartVouchers
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @GetMapping("/{cartId}/vouchers") @ResponseBody public VoucherListWsDTO getCartVouchers(@RequestParam(defaultValue="DEFAULT") String fields) -
doApplyCartVoucher
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @PostMapping("/{cartId}/vouchers") @ResponseStatus(OK) public void doApplyCartVoucher(@RequestParam String voucherId, javax.servlet.http.HttpServletRequest request) throws NoCheckoutCartException, VoucherOperationException -
removeCartVoucher
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @DeleteMapping("/{cartId}/vouchers/{voucherId}") @ResponseStatus(NO_CONTENT) public void removeCartVoucher(@PathVariable String voucherId) throws NoCheckoutCartException, VoucherOperationException
-