Class CustomerCouponsController
java.lang.Object
de.hybris.platform.customercouponocc.controllers.customercoupon.CustomerCouponsController
@Controller
@RequestMapping("/{baseSiteId}/users/{userId}/customercoupons")
public class CustomerCouponsController
extends Object
APIs for my coupons.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoClaimCustomerCoupon(String couponCode, String fields) doSubscribeToCustomerCoupon(String couponCode, String fields) voiddoUnsubscribeFromCustomerCoupon(String couponCode) protected org.springframework.validation.Validatorprotected CustomerCouponFacadegetCustomerCoupons(int currentPage, int pageSize, String sort, boolean needsTotal, String fields) protected CustomerFacadeprotected UserWsDTOgetCustomerWsDTO(String fields) protected DataMapperprotected WebPaginationUtilsprotected voidrecalculatePageSize(SearchPageData searchPageData) voidsetCustomerCouponCodeValidator(org.springframework.validation.Validator customerCouponCodeValidator) voidsetCustomerCouponFacade(CustomerCouponFacade customerCouponFacade) voidunassignCustomerCoupon(String couponCode) protected voidvalidateCoupon(org.springframework.validation.Validator validator, Object obj, String objName)
-
Field Details
-
COUPON_CODE
- See Also:
-
-
Constructor Details
-
CustomerCouponsController
public CustomerCouponsController()
-
-
Method Details
-
getCustomerCoupons
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseBody @GetMapping public CustomerCouponSearchResultWsDTO getCustomerCoupons(@RequestParam(name="currentPage",required=false,defaultValue="0") int currentPage, @RequestParam(name="pageSize",required=false,defaultValue="10") int pageSize, @RequestParam(name="sort",required=false) String sort, @RequestParam(name="needsTotal",required=false,defaultValue="true") boolean needsTotal, @RequestParam(defaultValue="DEFAULT") String fields) -
doClaimCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping("/{couponCode}/claim") @ResponseStatus(CREATED) @ResponseBody public CustomerCoupon2CustomerWsDTO doClaimCustomerCoupon(@PathVariable String couponCode, @RequestParam(defaultValue="DEFAULT") String fields) -
unassignCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @DeleteMapping("/{couponCode}/claim") @ResponseStatus(OK) @ResponseBody public void unassignCustomerCoupon(@PathVariable String couponCode) -
doSubscribeToCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @PostMapping("/{couponCode}/notification") @ResponseStatus(CREATED) @ResponseBody public CustomerCouponNotificationWsDTO doSubscribeToCustomerCoupon(@PathVariable String couponCode, @RequestParam(defaultValue="DEFAULT") String fields) -
doUnsubscribeFromCustomerCoupon
@Secured({"ROLE_CUSTOMERGROUP","ROLE_CUSTOMERMANAGERGROUP","ROLE_TRUSTED_CLIENT"}) @ResponseStatus(code=OK) @DeleteMapping("/{couponCode}/notification") public void doUnsubscribeFromCustomerCoupon(@PathVariable String couponCode) -
validateCoupon
-
recalculatePageSize
-
getCustomerWsDTO
-
getCustomerCouponFacade
-
setCustomerCouponFacade
-
getDataMapper
-
getCustomerNotificationPreferenceCheckStrategy
protected CustomerNotificationPreferenceCheckStrategy getCustomerNotificationPreferenceCheckStrategy() -
getWebPaginationUtils
-
getCustomerFacade
-
getCustomerCouponCodeValidator
protected org.springframework.validation.Validator getCustomerCouponCodeValidator() -
setCustomerCouponCodeValidator
public void setCustomerCouponCodeValidator(org.springframework.validation.Validator customerCouponCodeValidator)
-