Class DefaultRefundService

  • All Implemented Interfaces:
    RefundService
    Direct Known Subclasses:
    WarehousingRefundService

    public class DefaultRefundService
    extends java.lang.Object
    implements RefundService
    Default implementation of RefundService
    Sample usage:
     // order creation
     final OrderModel order = orderService.placeOrder(cart, deliveryAddress, null, paymentInfo);
     // create 'returns request'
     final ReturnRequestModel request = returnService.createReturnRequest(order);
     // assign RMA to 'return request'
     returnService.createRMA(request);
     // based on the original order a 'preview' will be created, so that we can apply the refunds without modifying the original order.
     final OrderModel refundOrderPreview = refundService.createRefundOrderPreview(request, order);
     // ... after that we will apply the refunds on the preview of our order AND DON'T create a OrderHistoryEntryModel entry
     refundService.apply(Arrays.asList(refundEntry), refundOrderPreview), false);
     // afterwards, if the customer agrees with the offered refund, we would apply the refund on the original order AND create a OrderHistoryEntryModel entry
     refundService.apply(Arrays.asList(refundEntry), order), true);
     
    • Constructor Detail

      • DefaultRefundService

        public DefaultRefundService()