Class DefaultRefundAmountCalculationService
java.lang.Object
de.hybris.platform.warehousing.returns.service.impl.DefaultRefundAmountCalculationService
- All Implemented Interfaces:
RefundAmountCalculationService
public class DefaultRefundAmountCalculationService
extends Object
implements RefundAmountCalculationService
Calculates the refund amount based on the basePrice of products being returned.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetCustomRefundAmount(ReturnRequestModel returnRequest) Returns the custom refund amount for aReturnRequestModel.getCustomRefundEntryAmount(ReturnEntryModel returnEntryModel) Gets theRefundEntryModel#_amountbased on the basePrice of products being returned in the entry.protected intgetNumberOfDigits(ReturnRequestModel returnRequest) Retrieves the number of digits to use base on aReturnRequestModelgetOriginalRefundAmount(ReturnRequestModel returnRequest) Returns the original refund amount for aReturnRequestModel.getOriginalRefundEntryAmount(ReturnEntryModel returnEntryModel) Calculates and persists theRefundEntryModel#_amountbased on the amount of products being returned in the entry.
-
Constructor Details
-
DefaultRefundAmountCalculationService
public DefaultRefundAmountCalculationService()
-
-
Method Details
-
getCustomRefundAmount
Description copied from interface:RefundAmountCalculationServiceReturns the custom refund amount for aReturnRequestModel.- Specified by:
getCustomRefundAmountin interfaceRefundAmountCalculationService- Parameters:
returnRequest- theReturnRequestModelfor which refund amount needs to be calculated- Returns:
BigDecimalrepresenting the custom refund amount
-
getCustomRefundEntryAmount
Description copied from interface:RefundAmountCalculationServiceGets theRefundEntryModel#_amountbased on the basePrice of products being returned in the entry.- Specified by:
getCustomRefundEntryAmountin interfaceRefundAmountCalculationService- Parameters:
returnEntryModel- theRefundEntryModelfor which refund amount needs to be calculated- Returns:
- the refundAmount for the requested
RefundEntryModel
-
getOriginalRefundAmount
Description copied from interface:RefundAmountCalculationServiceReturns the original refund amount for aReturnRequestModel.- Specified by:
getOriginalRefundAmountin interfaceRefundAmountCalculationService- Parameters:
returnRequest- theReturnRequestModelfor which refund amount needs to be calculated- Returns:
BigDecimalrepresenting the original refund amount
-
getOriginalRefundEntryAmount
Description copied from interface:RefundAmountCalculationServiceCalculates and persists theRefundEntryModel#_amountbased on the amount of products being returned in the entry.- Specified by:
getOriginalRefundEntryAmountin interfaceRefundAmountCalculationService- Parameters:
returnEntryModel- theRefundEntryModelfor which refund entry amount needs to be calculated- Returns:
- the sum of all refund amount
RefundEntryModelfor all entries, otherwise 0
-
getNumberOfDigits
Retrieves the number of digits to use base on aReturnRequestModel- Parameters:
returnRequest- the return request from which we want to find the number of digits to use- Returns:
- the number of digits to apply
-