Interface RefundService

All Known Implementing Classes:
DefaultRefundService, WarehousingRefundService

public interface RefundService
Service for handling Refund's
  • Method Details

    • createRefundOrderPreview

      OrderModel createRefundOrderPreview(OrderModel original)
      Create a "refund order" , which will be a clone of the original one. The new instance should be used for applying the refund. (see: RefundService#calculate)
      Parameters:
      original - the original order
      Returns:
      the refund order
    • apply

      void apply(List<RefundEntryModel> refunds, OrderModel order)
      Based on the assigned refund entries the order will be recalculated.
      Parameters:
      refunds - the refunds for which the amount will be calculated
      order - the refund order for which the refund will be calculated
    • apply

      void apply(OrderModel previewOrder, ReturnRequestModel request) throws OrderReturnRecordsHandlerException
      Based on the assigned refund entries of the 'previewOrder' createRefundOrderPreview(OrderModel) , the 'finalOrder' will be recalculated and modification entries will be written.
      Parameters:
      previewOrder - the order which holds the "refund entries"
      request - the request which holds the order for which the refunds will be calculated.
      Throws:
      OrderReturnRecordsHandlerException - in the case of any service error
    • getRefunds

      Returns the refunds for the specified order
      Parameters:
      request - the request
      Returns:
      the refunds