Class WarehousingReturnService
- java.lang.Object
-
- de.hybris.platform.returns.impl.DefaultReturnService
-
- de.hybris.platform.warehousing.returns.service.impl.WarehousingReturnService
-
- All Implemented Interfaces:
ReturnCallbackService
,ReturnService
public class WarehousingReturnService extends DefaultReturnService
Default OMS implementation of ReturnService. It adds validation to the return creation and can modify the newly created objects.
-
-
Constructor Summary
Constructors Constructor Description WarehousingReturnService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RefundEntryModel
createRefund(ReturnRequestModel request, AbstractOrderEntryModel entry, java.lang.String notes, java.lang.Long expectedQuantity, ReturnAction action, RefundReason reason)
Creates a ReplRefundacement based on the assigned OrderEntry instanceReturnRequestModel
createReturnRequest(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 void
finalizeRefund(RefundEntryModel refundEntry, boolean isInStore)
Handles whether or not the return is in store.protected void
finalizeReturnRequest(ReturnRequestModel returnRequest)
This updatesReturnRequestModel
withReturnStatus
APPROVAL_PENDINGprotected void
validateRefund(ReturnRequestModel request, OrderEntryModel entry, java.lang.Long expectedQuantity, ReturnAction action, RefundReason reason)
Verifies the parameters of the createRefund callprotected void
validateReturnRequest(OrderModel order)
Verifies the parameters of the createReturnRequest call-
Methods 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, onReturnApprovalResponse, onReturnCancelResponse, onReturnReceptionResponse, processRefundOrder, processReplacementOrder, processReturnEntries, requestManualPaymentReversalForReturnRequest, requestManualTaxReversalForReturnRequest, setFlexibleSearchService, setGenerator, setModelService, setModificationHandler, setRefundOrderProcessor, setRefundService, setReplacementOrderDao, setReplacementOrderProcessor, setReturnableChecks, setReturnActionRequestExecutor, setReturnRequestDao, setReturnsEntryProcessor
-
-
-
-
Method Detail
-
createReturnRequest
public ReturnRequestModel createReturnRequest(OrderModel order)
Description copied from class:DefaultReturnService
Creates an "authorization" object (@link ReturnRequest} for the order to be returned, if there doesn't exists one for that order so far- Specified by:
createReturnRequest
in interfaceReturnService
- Overrides:
createReturnRequest
in 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, java.lang.String notes, java.lang.Long expectedQuantity, ReturnAction action, RefundReason reason)
Description copied from class:DefaultReturnService
Creates a ReplRefundacement based on the assigned OrderEntry instance- Specified by:
createRefund
in interfaceReturnService
- Overrides:
createRefund
in 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
protected void validateReturnRequest(OrderModel order)
Verifies the parameters of the createReturnRequest call- Parameters:
order
- The order for which the return is created
-
finalizeReturnRequest
protected void finalizeReturnRequest(ReturnRequestModel returnRequest)
This updatesReturnRequestModel
withReturnStatus
APPROVAL_PENDING- Parameters:
returnRequest
- The newly created ReturnRequest
-
validateRefund
protected void validateRefund(ReturnRequestModel request, OrderEntryModel entry, java.lang.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
protected void finalizeRefund(RefundEntryModel refundEntry, boolean isInStore)
Handles whether or not the return is in store. For the in store return request, this method sets directly the "status" and "status" toReturnStatus.RECEIVED
and 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
-
-