From e4c857d6fabdbf5ce8baa7bd892abace714f6ef8 Mon Sep 17 00:00:00 2001 From: Adam Saghy Date: Thu, 18 Jul 2024 10:32:17 +0200 Subject: [PATCH] FINERACT-2081: Add missing fields to Loan product swagger --- .../api/LoanProductsApiResourceSwagger.java | 65 ++++++++++++++++++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java index 0682e866bdf..8bfcbd1b5c5 100644 --- a/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java +++ b/fineract-loan/src/main/java/org/apache/fineract/portfolio/loanproduct/api/LoanProductsApiResourceSwagger.java @@ -191,6 +191,12 @@ private PostLoanProductsRequest() {} public Integer recalculationCompoundingFrequencyInterval; @Schema(example = "1") public Integer recalculationCompoundingFrequencyOnDayType; + @Schema(example = "false") + public Boolean isArrearsBasedOnOriginalSchedule; + @Schema(example = "false") + public Boolean isCompoundingToBePostedAsTransaction; + @Schema(example = "false") + public Boolean allowCompoundingOnEod; // Accounting @Schema(example = "3") @@ -509,6 +515,10 @@ private GetLoanProductsPreClosureInterestCalculationStrategy() {} public GetLoanProductsPreClosureInterestCalculationStrategy preClosureInterestCalculationStrategy; @Schema(example = "true") public Boolean isArrearsBasedOnOriginalSchedule; + @Schema(example = "true") + public Boolean isCompoundingToBePostedAsTransaction; + @Schema(example = "true") + public Boolean allowCompoundingOnEod; @Schema(example = "1") public Integer recalculationCompoundingFrequencyInterval; @Schema(example = "1") @@ -1146,13 +1156,22 @@ private GetGlAccountMapping() {} public GetGlAccountMapping loanPortfolioAccount; public GetGlAccountMapping transfersInSuspenseAccount; public GetGlAccountMapping receivableInterestAccount; + public GetGlAccountMapping receivableFeeAccount; public GetGlAccountMapping receivablePenaltyAccount; public GetGlAccountMapping interestOnLoanAccount; public GetGlAccountMapping incomeFromFeeAccount; public GetGlAccountMapping incomeFromPenaltyAccount; public GetGlAccountMapping incomeFromRecoveryAccount; + public GetGlAccountMapping incomeFromChargeOffFeesAccount; + public GetGlAccountMapping incomeFromChargeOffInterestAccount; + public GetGlAccountMapping incomeFromChargeOffPenaltyAccount; + public GetGlAccountMapping incomeFromGoodwillCreditInterestAccount; + public GetGlAccountMapping incomeFromGoodwillCreditFeesAccount; + public GetGlAccountMapping incomeFromGoodwillCreditPenaltyAccount; public GetGlAccountMapping writeOffAccount; public GetGlAccountMapping goodwillCreditAccount; + public GetGlAccountMapping chargeOffExpenseAccount; + public GetGlAccountMapping chargeOffFraudExpenseAccount; public GetGlAccountMapping overpaymentLiabilityAccount; } @@ -1198,6 +1217,8 @@ private GetLoanCharge() {} public String name; @Schema(example = "ad11") public String shortName; + @Schema(example = "sample description") + public String description; @Schema(example = "true") public Boolean includeInBorrowerCycle; @Schema(example = "true") @@ -1213,6 +1234,10 @@ private GetLoanCharge() {} public Double maxPrincipal; @Schema(example = "7") public Integer numberOfRepayments; + @Schema(example = "5") + public Integer minNumberOfRepayments; + @Schema(example = "10") + public Integer maxNumberOfRepayments; @Schema(example = "7") public Integer repaymentEvery; public GetLoanProductsResponse.GetLoanProductsRepaymentFrequencyType repaymentFrequencyType; @@ -1220,14 +1245,30 @@ private GetLoanCharge() {} public Integer fixedLength; @Schema(example = "5.000000") public Double interestRatePerPeriod; + @Schema(example = "0.000000") + public Double minInterestRatePerPeriod; + @Schema(example = "10.000000") + public Double maxInterestRatePerPeriod; public GetLoanProductsProductIdResponse.GetLoanProductsInterestRateFrequencyType interestRateFrequencyType; @Schema(example = "60.000000") public Double annualInterestRate; + @Schema(example = "false") + public Boolean isLinkedToFloatingInterestRates; + @Schema(example = "false") + public Boolean isFloatingInterestRateCalculationAllowed; + @Schema(example = "false") + public Boolean allowVariableInstallments; + @Schema(example = "0") + public Integer minimumGap; + @Schema(example = "1") + public Integer maximumGap; public GetLoanProductsResponse.GetLoanProductsAmortizationType amortizationType; @Schema(example = "5.5") public BigDecimal fixedPrincipalPercentagePerInstallment; public GetLoanProductsTemplateResponse.GetLoanProductsInterestTemplateType interestType; public GetLoanProductsResponse.GetLoansProductsInterestCalculationPeriodType interestCalculationPeriodType; + @Schema(example = "false") + public Boolean allowPartialPeriodInterestCalculation; @Schema(example = "mifos-standard-strategy") public String transactionProcessingStrategyCode; @Schema(example = "Mifos style") @@ -1236,6 +1277,11 @@ private GetLoanCharge() {} public List paymentAllocation; @Schema(example = "[]") public List creditAllocation; + @Schema(example = "false") + public Boolean isInterestRecalculationEnabled; + public GetLoanProductsResponse.GetLoanProductsInterestRecalculationData interestRecalculationData; + @Schema(example = "false") + public Boolean canDefineInstallmentAmount; @Schema(example = "[]") public List charges; public Set productsPrincipalVariationsForBorrowerCycle; @@ -1244,24 +1290,33 @@ private GetLoanCharge() {} @Schema(example = "[]") public List numberOfRepaymentVariationsForBorrowerCycle; public GetLoanProductsResponse.GetLoanProductsAccountingRule accountingRule; + @Schema(example = "false") + public Boolean canUseForTopup; public GetLoanAccountingMappings accountingMappings; public Set paymentChannelToFundSourceMappings; public Set feeToIncomeAccountMappings; + @Schema(example = "false") + public Boolean isRatesEnabled; @Schema(example = "true") public Boolean multiDisburseLoan; @Schema(example = "3") public Integer maxTrancheCount; @Schema(example = "36000.000000") public Double outstandingLoanBalance; + @Schema(example = "true") + public Boolean disallowExpectedDisbursements; + @Schema(example = "true") + public Boolean allowApprovedDisbursedAmountsOverApplied; + @Schema(example = "flat") + public String overAppliedCalculationType; @Schema(example = "2") public Integer overdueDaysForNPA; @Schema(example = "50") public Integer principalThresholdForLastInstalment; public GetDelinquencyBucketsResponse delinquencyBucket; + public List delinquencyBucketOptions; @Schema(example = "false") public Boolean enableInstallmentLevelDelinquency; - @Schema(example = "true") - public Boolean disallowExpectedDisbursements; @Schema(example = "3") public Integer dueDaysForRepaymentEvent; @Schema(example = "3") @@ -1438,6 +1493,12 @@ private PutLoanProductsProductIdRequest() {} public Integer recalculationCompoundingFrequencyInterval; @Schema(example = "1") public Integer recalculationCompoundingFrequencyOnDayType; + @Schema(example = "false") + public Boolean isArrearsBasedOnOriginalSchedule; + @Schema(example = "false") + public Boolean isCompoundingToBePostedAsTransaction; + @Schema(example = "false") + public Boolean allowCompoundingOnEod; // Accounting @Schema(example = "3")