Hello everyone,
I was facing an error while creating an FD product using the request body
as given in Swagger documentation. Which is as follows:
{
"accountingRule": 1,
"charts": [
{
"chartSlabs": [
{
"annualInterestRate": 4.5,
"description": "from 0 to 90 days",
"fromPeriod": 0,
"periodType": 1,
"toPeriod": 90
}
],
"dateFormat": "dd MMMM yyyy",
"fromDate": "01 Jan 2014",
"locale": "en"
}
],
"currencyCode": "USD",
"description": "Daily compounding using Daily Balance, 5% per year, 365
days in year",
"digitsAfterDecimal": 2,
"inMultiplesOf": 0,
"interestCalculationDaysInYearType": 365,
"interestCalculationType": 1,
"interestCompoundingPeriodType": 1,
"interestPostingPeriodType": 4,
"locale": "en",
"maxDepositTerm": 5,
"maxDepositTermTypeId": 3,
"minDepositTerm": 1,
"minDepositTermTypeId": 1,
"name": "Fixed deposit product",
"preClosurePenalApplicable": true,
"preClosurePenalInterest": 1.75,
"preClosurePenalInterestOnTypeId": 1,
"shortName": "FD01"
}
First of all, I experienced an error because the "depositAmount" field was
missing. After fixing that, I faced an error stating my chartSlab end
period is not proper. On debugging further, I found that my code was
failing due to the function isNotProperPriodEnd() in
InterestRateChartSlabFields class. However, I found the condition to be a
bit bizarre (that my toPeriod and amountRangeTo should both be null). Is
this the right condition or should it be revised.
Apologies, if this is a false alarm.
Regards,
Uddyan Goyal