class DecliningBalanceLoanInterestCalculator implements LoanInterestCalculator {

    @Override
    public Money calculate(LoanInterestCalculationDetails loanInterestCalculationDetails) {

        Money loanAmount = loanInterestCalculationDetails.getLoanAmount();
        Double interestRate = loanInterestCalculationDetails.getInterestRate();

        GraceType graceType = loanInterestCalculationDetails.getGraceType();
        Integer gracePeriodDuration = loanInterestCalculationDetails.getGracePeriodDuration();
        Integer numberOfInstallments = loanInterestCalculationDetails.getNumberOfInstallments();
        Double interestFractionalRatePerInstallment = loanInterestCalculationDetails.getInterestFractionalRatePerInstallment();

        return getDecliningInterestAmount_v2(graceType, gracePeriodDuration, numberOfInstallments, loanAmount, interestRate, interestFractionalRatePerInstallment);

    }

}