adamsaghy commented on code in PR #3791:
URL: https://github.com/apache/fineract/pull/3791#discussion_r1519642876
##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/FixedDepositAccountsApiResource.java:
##########
@@ -208,6 +211,23 @@ public String retrieveOne(@PathParam("accountId")
@Parameter(description = "acco
DepositsApiConstants.FIXED_DEPOSIT_ACCOUNT_RESPONSE_DATA_PARAMETERS);
}
+ @POST
+ @Path("calculatefdinterest")
+ @Consumes({ MediaType.APPLICATION_JSON })
+ @Produces({ MediaType.APPLICATION_JSON })
+ @RequestBody(required = true, content = @Content(schema =
@Schema(implementation =
FixedDepositAccountsApiResourceSwagger.CalculateFixedDepositInterestRequest.class)))
+ @ApiResponses({
+ @ApiResponse(responseCode = "200", description = "OK", content =
@Content(schema = @Schema(implementation =
FixedDepositAccountsApiResourceSwagger.CalculateFixedDepositInterestResponse.class)))
})
+ public String calculateFixedDepositInterest(@Parameter(hidden = true)
final String apiRequestBodyAsJson) {
+ JsonElement jsonElement = fromJsonHelper.parse(apiRequestBodyAsJson);
+ double maturityAmount = fixedDepositAccountInterestCalculationService
Review Comment:
I dont think it should be a POST API, a GET API hence the fixed number of
parameters and the nature of this functionality would be more suitable.
--
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]