Class CustomerCouponsController
- java.lang.Object
-
- de.hybris.platform.customercouponoccaddon.controllers.customercoupon.CustomerCouponsController
-
@Controller @RequestMapping("/{baseSiteId}/users/{userId}/customercoupons") public class CustomerCouponsController extends java.lang.Object
APIs for my coupons.
-
-
Constructor Summary
Constructors Constructor Description CustomerCouponsController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CustomerCoupon2CustomerWsDTO
claimCoupon(java.lang.String couponCode, java.lang.String fields)
protected CustomerCouponFacade
getCustomerCouponFacade()
CustomerCouponSearchResultWsDTO
getCustomerCoupons(int currentPage, int pageSize, java.lang.String sort, boolean needsTotal, java.lang.String fields)
protected CustomerFacade
getCustomerFacade()
protected CustomerNotificationPreferenceCheckStrategy
getCustomerNotificationPreferenceCheckStrategy()
protected UserWsDTO
getCustomerWsDTO(java.lang.String fields)
protected DataMapper
getDataMapper()
protected WebPaginationUtils
getWebPaginationUtils()
protected void
recalculatePageSize(SearchPageData searchPageData)
CustomerCouponNotificationWsDTO
subscribeNotification(java.lang.String couponCode, java.lang.String fields)
void
unsubscribeNotification(java.lang.String couponCode)
protected void
validateCoupon(org.springframework.validation.Validator validator, java.lang.Object obj, java.lang.String objName)
-
-
-
Method Detail
-
getCustomerCoupons
@ResponseBody @Secured("ROLE_CUSTOMERGROUP") @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) java.lang.String sort, @RequestParam(name="needsTotal",required=false,defaultValue="true") boolean needsTotal, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
claimCoupon
@Secured("ROLE_CUSTOMERGROUP") @PostMapping("/{couponCode}/claim") @ResponseStatus(CREATED) @ResponseBody public CustomerCoupon2CustomerWsDTO claimCoupon(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
subscribeNotification
@Secured("ROLE_CUSTOMERGROUP") @PostMapping("/{couponCode}/notification") @ResponseStatus(CREATED) @ResponseBody public CustomerCouponNotificationWsDTO subscribeNotification(@PathVariable java.lang.String couponCode, @RequestParam(defaultValue="DEFAULT") java.lang.String fields)
-
unsubscribeNotification
@ResponseStatus(code=OK) @Secured("ROLE_CUSTOMERGROUP") @DeleteMapping("/{couponCode}/notification") public void unsubscribeNotification(@PathVariable java.lang.String couponCode)
-
validateCoupon
protected void validateCoupon(org.springframework.validation.Validator validator, java.lang.Object obj, java.lang.String objName)
-
recalculatePageSize
protected void recalculatePageSize(SearchPageData searchPageData)
-
getCustomerWsDTO
protected UserWsDTO getCustomerWsDTO(java.lang.String fields)
-
getCustomerCouponFacade
protected CustomerCouponFacade getCustomerCouponFacade()
-
getDataMapper
protected DataMapper getDataMapper()
-
getCustomerNotificationPreferenceCheckStrategy
protected CustomerNotificationPreferenceCheckStrategy getCustomerNotificationPreferenceCheckStrategy()
-
getWebPaginationUtils
protected WebPaginationUtils getWebPaginationUtils()
-
getCustomerFacade
protected CustomerFacade getCustomerFacade()
-
-