Interface RefundAmountCalculationService

All Known Implementing Classes:
DefaultRefundAmountCalculationService

public interface RefundAmountCalculationService
Service for handling refundAmount for ReturnRequestModel. It calculates and persists the refund amount for ReturnRequest and the included RefundEntryModel
  • Method Details

    • getCustomRefundAmount

      BigDecimal getCustomRefundAmount(ReturnRequestModel returnRequest)
      Returns the custom refund amount for a ReturnRequestModel.
      Parameters:
      returnRequest - the ReturnRequestModel for which refund amount needs to be calculated
      Returns:
      BigDecimal representing the custom refund amount
    • getCustomRefundEntryAmount

      BigDecimal getCustomRefundEntryAmount(ReturnEntryModel refundEntryModel)
      Gets the RefundEntryModel#_amount based on the basePrice of products being returned in the entry.
      Parameters:
      refundEntryModel - the RefundEntryModel for which refund amount needs to be calculated
      Returns:
      the refundAmount for the requested RefundEntryModel
    • getOriginalRefundAmount

      BigDecimal getOriginalRefundAmount(ReturnRequestModel returnRequest)
      Returns the original refund amount for a ReturnRequestModel.
      Parameters:
      returnRequest - the ReturnRequestModel for which refund amount needs to be calculated
      Returns:
      BigDecimal representing the original refund amount
    • getOriginalRefundEntryAmount

      BigDecimal getOriginalRefundEntryAmount(ReturnEntryModel refundEntryModel)
      Calculates and persists the RefundEntryModel#_amount based on the amount of products being returned in the entry.
      Parameters:
      refundEntryModel - the RefundEntryModel for which refund entry amount needs to be calculated
      Returns:
      the sum of all refund amount RefundEntryModel for all entries, otherwise 0