Class CartPromotionsController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
-
- de.hybris.platform.ycommercewebservices.v2.controller.CartPromotionsController
-
@Controller @RequestMapping("/{baseSiteId}/users/{userId}/carts") public class CartPromotionsController extends BaseCommerceController
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
API_COMPATIBILITY_B2C_CHANNELS, ENTRY
-
Fields inherited from class de.hybris.platform.ycommercewebservices.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 Constructor Description CartPromotionsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoApplyCartPromotion(java.lang.String promotionId)voiddoApplyCartVoucher(java.lang.String voucherId)PromotionResultListWsDTOgetCartPromotion(java.lang.String promotionId, java.lang.String fields)PromotionResultListWsDTOgetCartPromotions(java.lang.String fields)VoucherListWsDTOgetCartVouchers(java.lang.String fields)voidremoveCartPromotion(java.lang.String promotionId)voidremoveCartVoucher(java.lang.String voucherId)-
Methods inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseCommerceController
addPaymentDetailsInternal, 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, validateStatusesEnumValue
-
Methods inherited from class de.hybris.platform.ycommercewebservices.v2.controller.BaseController
addPaginationField, getDataMapper, handleDuplicateUidException, handleErrorInternal, handleHttpMessageNotReadableException, handleModelNotFoundException, logParam, logParam, logValue, sanitize, setDataMapper, setTotalCountHeader, setTotalCountHeader, validate
-
-
-
-
Method Detail
-
getCartPromotions
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/{cartId}/promotions") @ResponseBody public PromotionResultListWsDTO getCartPromotions(@RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
getCartPromotion
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CLIENT","ROLE_GUEST","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @GetMapping("/{cartId}/promotions/{promotionId}") @ResponseBody public PromotionResultListWsDTO getCartPromotion(@PathVariable java.lang.String promotionId, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
doApplyCartPromotion
@Secured("ROLE_TRUSTED_CLIENT") @PostMapping("/{cartId}/promotions") @ResponseStatus(OK) public void doApplyCartPromotion(@RequestParam(required=true) java.lang.String promotionId) throws CommercePromotionRestrictionException
-
removeCartPromotion
@Secured("ROLE_TRUSTED_CLIENT") @DeleteMapping("/{cartId}/promotions/{promotionId}") @ResponseStatus(OK) public void removeCartPromotion(@PathVariable java.lang.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") java.lang.String fields)
-
doApplyCartVoucher
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @PostMapping("/{cartId}/vouchers") @ResponseStatus(OK) public void doApplyCartVoucher(@RequestParam java.lang.String voucherId) throws NoCheckoutCartException, VoucherOperationException
-
removeCartVoucher
@Secured({"ROLE_CLIENT","ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT","ROLE_GUEST"}) @DeleteMapping("/{cartId}/vouchers/{voucherId}") @ResponseStatus(OK) public void removeCartVoucher(@PathVariable java.lang.String voucherId) throws NoCheckoutCartException, VoucherOperationException
-
-