Class VouchersController
- java.lang.Object
-
- de.hybris.platform.ycommercewebservices.v1.controller.BaseController
-
- de.hybris.platform.ycommercewebservices.v1.controller.VouchersController
-
@Controller("vouchersControllerV1") @RequestMapping("/{baseSiteId}/vouchers") public class VouchersController extends BaseControllerMain Controller for Vouchers
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
DEFAULT_CURRENT_PAGE, DEFAULT_PAGE_SIZE
-
-
Constructor Summary
Constructors Constructor Description VouchersController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description VoucherDatagetVoucherByCode(java.lang.String code)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 forHTTPSchannel.-
Methods inherited from class de.hybris.platform.ycommercewebservices.v1.controller.BaseController
handleErrorInternal, handleModelNotFoundException, sanitize
-
-
-
-
Method Detail
-
getVoucherByCode
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/{code}", method=GET) @ResponseBody public VoucherData getVoucherByCode(@PathVariable java.lang.String code) throws VoucherOperationExceptionWeb 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 forHTTPSchannel.- Parameters:
code- - voucher code - must be given as path variable.- Returns:
VoucherDatawhich will be marshaled to JSON or XML based on Accept-Header- Throws:
VoucherOperationException- if voucher cannot be found
-
-