Class OmsReturnsController
java.lang.Object
de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
de.hybris.platform.ordermanagementwebservices.controllers.returns.OmsReturnsController
WebResource exposing
OmsReturnFacade
http://host:port/ordermanagementwebservices/returns-
Field Summary
Fields inherited from class de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
ADMIN_GROUP, CUSTOMER_SUPPORT_ADMINISTRATOR_GROUP, CUSTOMER_SUPPORT_AGENT_GROUP, CUSTOMER_SUPPORT_MANAGER_GROUP, dataMapper, DEFAULT_CURRENT_PAGE, DEFAULT_FIELD_SET, DEFAULT_PAGE_SIZE, DEFAULT_SORT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapproveReturnRequest(String code) Request to approve Return RequestvoidcancelReturnRequest(CancelReturnRequestWsDTO cancelReturnRequestWsDTO) Request to cancel aReturnRequestModel.createReturnRequest(ReturnRequestWsDTO returnRequestWsDTO, String fields) Request to create return in the systemprotected Set<ReturnStatus>extractReturnStatuses(String statuses) Extracts theReturnStatusfrom the provided String representationRequest to get refund reasonsRequest to get return actionsgetReturnEntriesForOrderCode(String code, String fields, int currentPage, int pageSize, String sort) Request to get returnEntries for the givenReturnRequestModel.CODEgetReturnForReturnCode(String code, String fields) Request to get ReturnRequest by its codegetReturns(String fields, int currentPage, int pageSize, String sort) Request to get paged returns in the systemgetReturnsByStatus(String returnStatuses, String fields, int currentPage, int pageSize, String sort) Request to get paged returns with certain return status(s)Request to get return cancellation reasonsRequest to get allReturnStatusin the systemvoidmanuallyReversePayment(@NotNull String code) Request to reverse payment manually.voidmanuallyReverseTax(@NotNull String code) Request to reverse tax manually.updateReturnByReturnCode(@NotNull ReturnRequestModificationWsDTO returnRequestModificationWsDTO, @NotNull String code, String fields) Request to update ReturnRequest by its codeMethods inherited from class de.hybris.platform.ordermanagementwebservices.controllers.OmsBaseController
createPageable, validate
-
Constructor Details
-
OmsReturnsController
public OmsReturnsController()
-
-
Method Details
-
getReturns
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(method=GET) @ResponseBody public ReturnSearchPageWsDTO getReturns(@RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false,defaultValue="asc") String sort) Request to get paged returns in the system- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICcurrentPage- number of the current pagepageSize- number of items in a pagesort- sorting the results ascending or descending- Returns:
- list of returns
-
getReturnsByStatus
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="status/{returnStatuses}", method=GET) @ResponseBody public ReturnSearchPageWsDTO getReturnsByStatus(@PathVariable String returnStatuses, @RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false,defaultValue="asc") String sort) throws WebserviceValidationException Request to get paged returns with certain return status(s)- Parameters:
returnStatuses- a list of valid return statuses separated by ","fields- defaulted to DEFAULT but can be FULL or BASICcurrentPage- number of the current pagepageSize- number of items in a pagesort- sorting the results ascending or descending- Returns:
- list of returns that complies with conditions above
- Throws:
WebserviceValidationException- in case of passing a wrong return status validation exception will be thrown
-
getReturnForReturnCode
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="{code}", method=GET) @ResponseBody public ReturnRequestWsDTO getReturnForReturnCode(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to get ReturnRequest by its code- Parameters:
code- the code of the requested returnfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- the requested returnRequest that complies with conditions above
-
updateReturnByReturnCode
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="{code}", method=PUT, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) @ResponseBody public ReturnRequestWsDTO updateReturnByReturnCode(@NotNull @RequestBody @NotNull ReturnRequestModificationWsDTO returnRequestModificationWsDTO, @NotNull @PathVariable @NotNull String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to update ReturnRequest by its code- Parameters:
code- the code of the requested returnfields- defaulted to DEFAULT but can be FULL or BASIC- Returns:
- the requested returnRequest that complies with conditions above
-
getReturnStatuses
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/statuses", method=GET) @ResponseBody public ReturnStatusListWsDTO getReturnStatuses()Request to get allReturnStatusin the system- Returns:
- list of return statuses
-
getReturnEntriesForOrderCode
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/{code}/entries", method=GET) @ResponseBody public ReturnEntrySearchPageWsDTO getReturnEntriesForOrderCode(@PathVariable String code, @RequestParam(required=false,defaultValue="DEFAULT") String fields, @RequestParam(required=false,defaultValue="0") int currentPage, @RequestParam(required=false,defaultValue="10") int pageSize, @RequestParam(required=false,defaultValue="asc") String sort) Request to get returnEntries for the givenReturnRequestModel.CODE- Parameters:
code- return's code for the requested return entriesfields- defaulted to DEFAULT but can be FULL or BASICcurrentPage- number of the current pagepageSize- number of items in a pagesort- sorting the results ascending or descending- Returns:
- the list of returnEntries fulfilling the above conditions
-
createReturnRequest
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(CREATED) @ResponseBody public ReturnRequestWsDTO createReturnRequest(@RequestBody ReturnRequestWsDTO returnRequestWsDTO, @RequestParam(required=false,defaultValue="DEFAULT") String fields) Request to create return in the system- Parameters:
fields- defaulted to DEFAULT but can be FULL or BASICreturnRequestWsDTO- object representingReturnRequestWsDTO- Returns:
- created return
-
getReturnsCancellationReasons
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/cancel-reasons", method=GET) @ResponseBody public CancelReasonListWsDTO getReturnsCancellationReasons()Request to get return cancellation reasons- Returns:
- list of cancel reasons
-
getRefundReasons
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/refund-reasons", method=GET) @ResponseBody public RefundReasonListWsDTO getRefundReasons()Request to get refund reasons- Returns:
- list of refund reasons
-
getReturnActions
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/actions", method=GET) @ResponseBody public ReturnActionListWsDTO getReturnActions()Request to get return actions- Returns:
- list of return actions
-
approveReturnRequest
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="{code}/approve", method=POST) @ResponseStatus(OK) public void approveReturnRequest(@PathVariable String code) Request to approve Return Request- Parameters:
code- code for the requested returnRequest
-
cancelReturnRequest
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="/cancel", method=POST, produces={"application/json","application/xml"}, consumes={"application/json","application/xml"}) @ResponseStatus(OK) public void cancelReturnRequest(@RequestBody CancelReturnRequestWsDTO cancelReturnRequestWsDTO) throws WebserviceValidationException Request to cancel aReturnRequestModel.- Parameters:
cancelReturnRequestWsDTO- contains information about the cancellation of the return request.- Throws:
WebserviceValidationException- in case the request body has erroneous fields.
-
manuallyReversePayment
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="{code}/manual/reverse-payment", method=POST) @ResponseStatus(OK) public void manuallyReversePayment(@NotNull @PathVariable @NotNull String code) Request to reverse payment manually.- Parameters:
code- code for the requested returnRequest
-
manuallyReverseTax
@Secured({"ROLE_CUSTOMERSUPPORTAGENTGROUP","ROLE_CUSTOMERSUPPORTMANAGERGROUP","ROLE_CUSTOMERSUPPORTADMINISTRATORGROUP"}) @RequestMapping(value="{code}/manual/reverse-tax", method=POST) @ResponseStatus(OK) public void manuallyReverseTax(@NotNull @PathVariable @NotNull String code) Request to reverse tax manually.- Parameters:
code- code for the requested returnRequest
-
extractReturnStatuses
Extracts theReturnStatusfrom the provided String representation- Parameters:
statuses- a comma-separated string that representReturnStatus- Returns:
- the newly extracted
Set<ReturnStatus>
-