Class VouchersController


  • @Controller("vouchersControllerV1")
    @RequestMapping("/{baseSiteId}/vouchers")
    public class VouchersController
    extends BaseController
    Main Controller for Vouchers
    • Constructor Detail

      • VouchersController

        public VouchersController()
    • Method Detail

      • getVoucherByCode

        @Secured("ROLE_TRUSTED_CLIENT")
        @RequestMapping(value="/{code}",
                        method=GET)
        @ResponseBody
        public VoucherData getVoucherByCode​(@PathVariable
                                            java.lang.String code)
                                     throws VoucherOperationException
        Web service for getting voucher information by voucher code.
        Sample call: https://localhost:9002/rest/v1/mysite/vouchers/abc-9PSW-EDH2-RXKA
        This method requires authentication.
        Method type : GET.
        Method is restricted for HTTPS channel.
        Parameters:
        code - - voucher code - must be given as path variable.
        Returns:
        VoucherData which will be marshaled to JSON or XML based on Accept-Header
        Throws:
        VoucherOperationException - if voucher cannot be found