Class WarehousingReturnService

    • Constructor Detail

      • WarehousingReturnService

        public WarehousingReturnService()
    • Method Detail

      • 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 interface ReturnService
        Overrides:
        createRefund in class DefaultReturnService
        Parameters:
        request - we use this for the verification process (order)
        entry - the original OrderEntry
        notes - some notes
        expectedQuantity - 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
      • 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 RefundEntry
        entry - The OrderEntry with the products to be refunded
        expectedQuantity - The amount of items to be refunded
        action - The action to take on this refund
        reason - 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" to ReturnStatus.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 to ReturnStatus.APPROVAL_PENDING
        Parameters:
        refundEntry - The newly created refundEntry
        isInStore - indicates if the return request is in store or online