Class WarehousingReturnService
java.lang.Object
de.hybris.platform.returns.impl.DefaultReturnService
de.hybris.platform.warehousing.returns.service.impl.WarehousingReturnService
- All Implemented Interfaces:
ReturnCallbackService,ReturnService
Default OMS implementation of ReturnService. It adds validation to the return creation and can modify the newly
created objects.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateRefund(ReturnRequestModel request, AbstractOrderEntryModel entry, String notes, Long expectedQuantity, ReturnAction action, RefundReason reason) Creates a ReplRefundacement based on the assigned OrderEntry instancecreateReturnRequest(OrderModel order) Creates an "authorization" object (@link ReturnRequest} for the order to be returned, if there doesn't exists one for that order so farprotected voidfinalizeRefund(RefundEntryModel refundEntry, boolean isInStore) Handles whether or not the return is in store.protected voidfinalizeReturnRequest(ReturnRequestModel returnRequest) This updatesReturnRequestModelwithReturnStatusAPPROVAL_PENDINGprotected voidvalidateRefund(ReturnRequestModel request, OrderEntryModel entry, Long expectedQuantity, ReturnAction action, RefundReason reason) Verifies the parameters of the createRefund callprotected voidvalidateReturnRequest(OrderModel order) Verifies the parameters of the createReturnRequest callMethods inherited from class de.hybris.platform.returns.impl.DefaultReturnService
addReplacementOrderEntries, createReplacement, createReplacementOrder, createRMA, getAllReturnableEntries, getFlexibleSearchService, getGenerator, getModelService, getModificationHandler, getOrderByCode, getOrderReturnRecordForOrder, getRefundOrderProcessor, getRefundService, getReplacementOrder, getReplacementOrderDao, getReplacementOrderProcessor, getReplacements, getReturnableChecks, getReturnActionRequestExecutor, getReturnEntries, getReturnEntry, getReturnRequestDao, getReturnRequests, getReturnsEntryProcessor, getRMA, isReturnable, maxReturnQuantity, onReturnApprovalResponse, onReturnCancelResponse, onReturnReceptionResponse, processRefundOrder, processReplacementOrder, processReturnEntries, requestManualPaymentReversalForReturnRequest, requestManualTaxReversalForReturnRequest, setFlexibleSearchService, setGenerator, setModelService, setModificationHandler, setRefundOrderProcessor, setRefundService, setReplacementOrderDao, setReplacementOrderProcessor, setReturnableChecks, setReturnActionRequestExecutor, setReturnRequestDao, setReturnsEntryProcessor
-
Constructor Details
-
WarehousingReturnService
public WarehousingReturnService()
-
-
Method Details
-
createReturnRequest
Description copied from class:DefaultReturnServiceCreates an "authorization" object (@link ReturnRequest} for the order to be returned, if there doesn't exists one for that order so far- Specified by:
createReturnRequestin interfaceReturnService- Overrides:
createReturnRequestin classDefaultReturnService- Parameters:
order- the order which should be returned- Returns:
- ReturnRequest instance, which will deliver among others the RMA code of every processed "return order".
-
createRefund
public RefundEntryModel createRefund(ReturnRequestModel request, AbstractOrderEntryModel entry, String notes, Long expectedQuantity, ReturnAction action, RefundReason reason) Description copied from class:DefaultReturnServiceCreates a ReplRefundacement based on the assigned OrderEntry instance- Specified by:
createRefundin interfaceReturnService- Overrides:
createRefundin classDefaultReturnService- Parameters:
request- we use this for the verification process (order)entry- the original OrderEntrynotes- some notesexpectedQuantity- the amount of products which the customer wants to got a refund.action- action which indicates if the 'returns process' will be executed immediately or is still on hold (waiting for the article to be send back)reason- reason for the refund- Returns:
- Refund entry instance
-
validateReturnRequest
Verifies the parameters of the createReturnRequest call- Parameters:
order- The order for which the return is created
-
finalizeReturnRequest
This updatesReturnRequestModelwithReturnStatusAPPROVAL_PENDING- Parameters:
returnRequest- The newly created ReturnRequest
-
validateRefund
protected void validateRefund(ReturnRequestModel request, OrderEntryModel entry, Long expectedQuantity, ReturnAction action, RefundReason reason) Verifies the parameters of the createRefund call- Parameters:
request- The ReturnRequest that will contain this RefundEntryentry- The OrderEntry with the products to be refundedexpectedQuantity- The amount of items to be refundedaction- The action to take on this refundreason- Reason code why the refund is requested
-
finalizeRefund
Handles whether or not the return is in store. For the in store return request, this method sets directly the "status" and "status" toReturnStatus.RECEIVEDand the received quantity to the expected quantity. For an online return request, the received quantity is set to 0 and the "status" and "status" is set toReturnStatus.APPROVAL_PENDING- Parameters:
refundEntry- The newly created refundEntryisInStore- indicates if the return request is in store or online
-