Class CustomerCouponsController


  • @Controller
    @RequestMapping("/{baseSiteId}/users/{userId}/customercoupons")
    public class CustomerCouponsController
    extends java.lang.Object
    APIs for my coupons.
    • Constructor Detail

      • CustomerCouponsController

        public CustomerCouponsController()
    • 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)
      • getDataMapper

        protected DataMapper getDataMapper()