public class DefaultRefundAmountCalculationService extends Object implements RefundAmountCalculationService
| Constructor and Description |
|---|
DefaultRefundAmountCalculationService() |
| Modifier and Type | Method and Description |
|---|---|
BigDecimal |
getCustomRefundAmount(ReturnRequestModel returnRequest)
Returns the custom refund amount for a
ReturnRequestModel. |
BigDecimal |
getCustomRefundEntryAmount(ReturnEntryModel returnEntryModel)
Gets the
RefundEntryModel#_amount based on the basePrice of products being returned in the entry. |
protected int |
getNumberOfDigits(ReturnRequestModel returnRequest)
Retrieves the number of digits to use base on a
ReturnRequestModel |
BigDecimal |
getOriginalRefundAmount(ReturnRequestModel returnRequest)
Returns the original refund amount for a
ReturnRequestModel. |
BigDecimal |
getOriginalRefundEntryAmount(ReturnEntryModel returnEntryModel)
Calculates and persists the
RefundEntryModel#_amount based on the amount of products being returned in the entry. |
public DefaultRefundAmountCalculationService()
public BigDecimal getCustomRefundAmount(ReturnRequestModel returnRequest)
RefundAmountCalculationServiceReturnRequestModel.getCustomRefundAmount in interface RefundAmountCalculationServicereturnRequest - the ReturnRequestModel for which refund amount needs to be calculatedpublic BigDecimal getCustomRefundEntryAmount(ReturnEntryModel returnEntryModel)
RefundAmountCalculationServiceRefundEntryModel#_amount based on the basePrice of products being returned in the entry.getCustomRefundEntryAmount in interface RefundAmountCalculationServicereturnEntryModel - the RefundEntryModel for which refund amount needs to be calculatedRefundEntryModelpublic BigDecimal getOriginalRefundAmount(ReturnRequestModel returnRequest)
RefundAmountCalculationServiceReturnRequestModel.getOriginalRefundAmount in interface RefundAmountCalculationServicereturnRequest - the ReturnRequestModel for which refund amount needs to be calculatedpublic BigDecimal getOriginalRefundEntryAmount(ReturnEntryModel returnEntryModel)
RefundAmountCalculationServiceRefundEntryModel#_amount based on the amount of products being returned in the entry.getOriginalRefundEntryAmount in interface RefundAmountCalculationServicereturnEntryModel - the RefundEntryModel for which refund entry amount needs to be calculatedRefundEntryModel for all entries, otherwise 0protected int getNumberOfDigits(ReturnRequestModel returnRequest)
ReturnRequestModelreturnRequest - the return request from which we want to find the number of digits to useCopyright © 2017 SAP SE. All Rights Reserved.