GoyalRocks007 commented on code in PR #3791:
URL: https://github.com/apache/fineract/pull/3791#discussion_r1519712243
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/data/DepositAccountDataValidator.java:
##########
@@ -582,6 +604,33 @@ private void validateDepositTermDeatilForUpdate(final
JsonElement element, final
}
}
+ private void validateForInterestCalc(final JsonElement element, final
DataValidatorBuilder baseDataValidator) {
+
+ Long principalAmount =
this.fromApiJsonHelper.extractLongNamed(principalAmountParamName, element);
+
baseDataValidator.reset().parameter(principalAmountParamName).value(principalAmount).notNull();
Review Comment:
noted.
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResourceSwagger.java:
##########
@@ -256,6 +256,33 @@ private GetFixedDepositAccountsDepositPeriodFrequency() {}
public GetFixedDepositAccountsDepositPeriodFrequency
depositPeriodFrequency;
}
+ @Schema(description = "CalculateFixedDepositInterestRequest")
+ public static final class CalculateFixedDepositInterestRequest {
+
+ private CalculateFixedDepositInterestRequest() {}
+
+ @Schema(example = "10000")
+ public long principalAmount;
+ @Schema(example = "5")
+ public float annualInterestRate;
+ @Schema(example = "12")
+ public int tenureInMonths;
+ @Schema(example = "3")
+ public int interestPostingPeriodInMonths;
+ @Schema(example = "1")
+ public int interestCompoundingPeriodInMonths;
+
+ }
+
+ @Schema(description = "CalculateFixedDepositInterestResponse")
+ public static final class CalculateFixedDepositInterestResponse {
+
+ private CalculateFixedDepositInterestResponse() {}
+
+ @Schema(example = "10511.61")
+ public float maturityAmount;
Review Comment:
Noted
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]