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 BaseController
Main 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 -
Method Summary
Modifier and TypeMethodDescriptiongetVoucherByCode(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
-
Constructor Details
-
VouchersController
public VouchersController()
-
-
Method Details
-
getVoucherByCode
@Secured("ROLE_TRUSTED_CLIENT") @RequestMapping(value="/{code}", method=GET) @ResponseBody public VoucherData getVoucherByCode(@PathVariable 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 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
-