From a8bbba0b246f5c9c43e82fcdbfc920915cc77cd3 Mon Sep 17 00:00:00 2001 From: Arnold Galovics Date: Tue, 18 Mar 2025 19:00:41 +0100 Subject: [PATCH] FINERACT-2181: Generating the right ChargeData class for ChargesApi --- .../factory/LoanProductsRequestFactory.java | 20 +++---- .../LoanProductGlobalInitializerStep.java | 10 ++-- .../api/LoanProductsApiResourceSwagger.java | 54 ++----------------- ...eOffWithAdvancedPaymentAllocationTest.java | 4 +- ...playWithAdvancedPaymentAllocationTest.java | 4 +- .../LoanPostChargeOffScenariosTest.java | 4 +- ...oanProductChargeOffReasonMappingsTest.java | 4 +- ...TransactionAccrualActivityPostingTest.java | 4 +- .../RepaymentReverseExternalIdTest.java | 4 +- ...paymentWithDownPaymentIntegrationTest.java | 4 +- .../LoanPenaltyBackdatedTransactionTest.java | 8 +-- .../loan/pointintime/LoanPointInTimeTest.java | 6 +-- .../loan/repayment/LoanRepaymentTest.java | 4 +- 13 files changed, 42 insertions(+), 88 deletions(-) diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java index 5dc5cf2fe..9acfe9844 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/LoanProductsRequestFactory.java @@ -25,10 +25,10 @@ import java.util.ArrayList; import java.util.List; import lombok.RequiredArgsConstructor; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostChargeOffReasonToExpenseAccountMappings; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.test.data.AccountingRule; @@ -131,7 +131,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -241,7 +241,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -349,7 +349,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -457,7 +457,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -570,7 +570,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -795,7 +795,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -908,7 +908,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -1019,7 +1019,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); @@ -1129,7 +1129,7 @@ public class LoanProductsRequestFactory { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java index 613428d2d..52a9bf34e 100644 --- a/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java +++ b/fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/initializer/global/LoanProductGlobalInitializerStep.java @@ -33,9 +33,9 @@ import java.util.List; import java.util.concurrent.atomic.AtomicInteger; import lombok.RequiredArgsConstructor; import org.apache.fineract.client.models.AdvancedPaymentData; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.CreditAllocationData; import org.apache.fineract.client.models.CreditAllocationOrder; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.LoanProductPaymentAllocationRule; import org.apache.fineract.client.models.PaymentAllocationOrder; import org.apache.fineract.client.models.PostLoanProductsRequest; @@ -262,8 +262,8 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ // LP1 with 12% FLAT interest with % overdue fee for amount // (LP1_INTEREST_FLAT_OVERDUE_FROM_AMOUNT) String name13 = DefaultLoanProduct.LP1_INTEREST_FLAT_OVERDUE_FROM_AMOUNT.getName(); - List charges = new ArrayList<>(); - charges.add(new ChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE.value)); + List charges = new ArrayList<>(); + charges.add(new LoanProductChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE.value)); PostLoanProductsRequest loanProductsRequestInterestFlatOverdueFeeAmount = loanProductsRequestFactory .defaultLoanProductsRequestLP1InterestFlat()// .name(name13)// @@ -276,8 +276,8 @@ public class LoanProductGlobalInitializerStep implements FineractGlobalInitializ // LP1 with 12% FLAT interest with % overdue fee for amount+interest // (LP1_INTEREST_FLAT_OVERDUE_FROM_AMOUNT_INTEREST) String name14 = DefaultLoanProduct.LP1_INTEREST_FLAT_OVERDUE_FROM_AMOUNT_INTEREST.getName(); - List chargesInterest = new ArrayList<>(); - chargesInterest.add(new ChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE_AMOUNT_PLUS_INTEREST.value)); + List chargesInterest = new ArrayList<>(); + chargesInterest.add(new LoanProductChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE_AMOUNT_PLUS_INTEREST.value)); PostLoanProductsRequest loanProductsRequestInterestFlatOverdueFeeAmountInterest = loanProductsRequestFactory .defaultLoanProductsRequestLP1InterestFlat()// .name(name14)// 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 070a830ff..955db97c6 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 @@ -267,7 +267,7 @@ final class LoanProductsApiResourceSwagger { @Schema(example = "36000.00") public Double outstandingLoanBalance; - public List charges; + public List charges; @Schema(example = "en_GB") public String locale; @Schema(example = "dd MMMM yyyy") @@ -302,9 +302,9 @@ final class LoanProductsApiResourceSwagger { public boolean graceOnArrearsAgeing; } - static final class ChargeData { + static final class LoanProductChargeData { - private ChargeData() {} + private LoanProductChargeData() {} @Schema(example = "1") public Long id; @@ -1688,7 +1688,7 @@ final class LoanProductsApiResourceSwagger { @Schema(example = "36000.00") public Double outstandingLoanBalance; - public List charges; + public List charges; @Schema(example = "en_GB") public String locale; @Schema(example = "dd MMMM yyyy") @@ -1702,52 +1702,6 @@ final class LoanProductsApiResourceSwagger { public PostLoanProductsRequest.AllowAttributeOverrides allowAttributeOverrides; public List rates; - static final class AllowAttributeOverrides { - - private AllowAttributeOverrides() {} - - @Schema(example = "true") - public boolean amortizationType; - @Schema(example = "true") - public boolean interestType; - @Schema(example = "true") - public boolean transactionProcessingStrategyCode; - @Schema(example = "true") - public boolean interestCalculationPeriodType; - @Schema(example = "true") - public boolean inArrearsTolerance; - @Schema(example = "true") - public boolean repaymentEvery; - @Schema(example = "true") - public boolean graceOnPrincipalAndInterestPayment; - @Schema(example = "true") - public boolean graceOnArrearsAgeing; - } - - static final class ChargeData { - - private ChargeData() {} - - @Schema(example = "1") - public Long id; - } - - static final class RateData { - - private RateData() {} - - @Schema(example = "1") - public Long id; - @Schema(example = "some name") - public String name; - @Schema(example = "20") - public BigDecimal percentage; - @Schema(description = "Apply specific product using its id, code, and value.") - public EnumOptionData productApply; - @Schema(example = "false") - public boolean active; - } - public List supportedInterestRefundTypes; @Schema(example = "REGULAR") public String chargeOffBehaviour; diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java index 0d9628efb..28c3d549d 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeOffWithAdvancedPaymentAllocationTest.java @@ -39,7 +39,6 @@ import java.util.UUID; import java.util.concurrent.atomic.AtomicReference; import org.apache.fineract.client.models.AdvancedPaymentData; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetJournalEntriesTransactionIdResponse; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; @@ -48,6 +47,7 @@ import org.apache.fineract.client.models.GetLoanTransactionRelation; import org.apache.fineract.client.models.GetLoansLoanIdResponse; import org.apache.fineract.client.models.GetLoansLoanIdTransactionsTransactionIdResponse; import org.apache.fineract.client.models.JournalEntryTransactionItem; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PaymentTypeRequest; import org.apache.fineract.client.models.PostClientsResponse; import org.apache.fineract.client.models.PostLoanProductsRequest; @@ -662,7 +662,7 @@ public class LoanAccountChargeOffWithAdvancedPaymentAllocationTest extends BaseL List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java index bea33f1f9..e67ba55a5 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest.java @@ -35,11 +35,11 @@ import java.util.List; import java.util.UUID; import org.apache.fineract.client.models.AdvancedPaymentData; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; import org.apache.fineract.client.models.GetLoansLoanIdResponse; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PaymentTypeRequest; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; @@ -354,7 +354,7 @@ public class LoanAccountChargeReveseReplayWithAdvancedPaymentAllocationTest exte List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java index e1a30ffa5..8a0f6f7a9 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanPostChargeOffScenariosTest.java @@ -34,7 +34,6 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetJournalEntriesTransactionIdResponse; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; @@ -43,6 +42,7 @@ import org.apache.fineract.client.models.GetLoanTransactionRelation; import org.apache.fineract.client.models.GetLoansLoanIdResponse; import org.apache.fineract.client.models.GetLoansLoanIdTransactionsTransactionIdResponse; import org.apache.fineract.client.models.JournalEntryTransactionItem; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PaymentTypeRequest; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; @@ -1128,7 +1128,7 @@ public class LoanPostChargeOffScenariosTest extends BaseLoanIntegrationTest { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java index e7e7a2d4e..801cd870b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanProductChargeOffReasonMappingsTest.java @@ -24,11 +24,11 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; import org.apache.fineract.client.models.GetLoanProductsProductIdResponse; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostChargeOffReasonToExpenseAccountMappings; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PutLoanProductsProductIdRequest; @@ -107,7 +107,7 @@ public class LoanProductChargeOffReasonMappingsTest extends BaseLoanIntegrationT List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java index 6b1f48df4..724a760df 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/LoanTransactionAccrualActivityPostingTest.java @@ -35,13 +35,13 @@ import java.util.List; import java.util.concurrent.atomic.AtomicReference; import org.apache.fineract.client.models.AdvancedPaymentData; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeRequest; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; import org.apache.fineract.client.models.GetLoansLoanIdResponse; import org.apache.fineract.client.models.GetLoansLoanIdStatus; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostChargesResponse; import org.apache.fineract.client.models.PostClientsResponse; import org.apache.fineract.client.models.PostLoanProductsRequest; @@ -1432,7 +1432,7 @@ public class LoanTransactionAccrualActivityPostingTest extends BaseLoanIntegrati List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java index 2620cb52a..0e1c93c6a 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/RepaymentReverseExternalIdTest.java @@ -33,12 +33,12 @@ import java.util.ArrayList; import java.util.List; import java.util.UUID; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; import org.apache.fineract.client.models.GetLoansLoanIdResponse; import org.apache.fineract.client.models.GetLoansLoanIdTransactions; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoansLoanIdRequest; import org.apache.fineract.client.models.PostLoansLoanIdTransactionsRequest; @@ -140,7 +140,7 @@ public class RepaymentReverseExternalIdTest extends BaseLoanIntegrationTest { List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java index 9ee09e73a..803a2101c 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/UndoRepaymentWithDownPaymentIntegrationTest.java @@ -36,12 +36,12 @@ import java.util.List; import java.util.UUID; import org.apache.fineract.client.models.AdvancedPaymentData; import org.apache.fineract.client.models.AllowAttributeOverrides; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.ChargeToGLAccountMapper; import org.apache.fineract.client.models.GetLoanFeeToIncomeAccountMappings; import org.apache.fineract.client.models.GetLoanPaymentChannelToFundSourceMappings; import org.apache.fineract.client.models.GetLoanProductsProductIdResponse; import org.apache.fineract.client.models.GetLoansLoanIdResponse; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PaymentTypeRequest; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; @@ -203,7 +203,7 @@ public class UndoRepaymentWithDownPaymentIntegrationTest extends BaseLoanIntegra List principalVariationsForBorrowerCycle = new ArrayList<>(); List numberOfRepaymentVariationsForBorrowerCycle = new ArrayList<>(); List interestRateVariationsForBorrowerCycle = new ArrayList<>(); - List charges = new ArrayList<>(); + List charges = new ArrayList<>(); List penaltyToIncomeAccountMappings = new ArrayList<>(); List feeToIncomeAccountMappings = new ArrayList<>(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java index 6c9cd6975..a68c50d12 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/penalty/LoanPenaltyBackdatedTransactionTest.java @@ -21,7 +21,7 @@ package org.apache.fineract.integrationtests.loan.penalty; import java.math.BigDecimal; import java.util.List; import java.util.concurrent.atomic.AtomicReference; -import org.apache.fineract.client.models.ChargeData; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; import org.apache.fineract.client.models.PostLoansLoanIdResponse; @@ -86,7 +86,7 @@ public class LoanPenaltyBackdatedTransactionTest extends BaseLoanIntegrationTest .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(chargeId)));// + .charges(List.of(new LoanProductChargeData().id(chargeId)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId(); @@ -199,7 +199,7 @@ public class LoanPenaltyBackdatedTransactionTest extends BaseLoanIntegrationTest .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(chargeId)));// + .charges(List.of(new LoanProductChargeData().id(chargeId)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId(); @@ -313,7 +313,7 @@ public class LoanPenaltyBackdatedTransactionTest extends BaseLoanIntegrationTest .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(chargeId)));// + .charges(List.of(new LoanProductChargeData().id(chargeId)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java index 16eb4405e..4ef88a20b 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/pointintime/LoanPointInTimeTest.java @@ -23,8 +23,8 @@ import static org.apache.fineract.integrationtests.BaseLoanIntegrationTest.Trans import java.math.BigDecimal; import java.util.List; import java.util.concurrent.atomic.AtomicReference; -import org.apache.fineract.client.models.ChargeData; import org.apache.fineract.client.models.LoanPointInTimeData; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; import org.apache.fineract.client.models.PostLoansLoanIdResponse; @@ -74,7 +74,7 @@ public class LoanPointInTimeTest extends BaseLoanIntegrationTest { .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(charge1Id), new ChargeData().id(charge2Id)));// + .charges(List.of(new LoanProductChargeData().id(charge1Id), new LoanProductChargeData().id(charge2Id)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId(); @@ -549,7 +549,7 @@ public class LoanPointInTimeTest extends BaseLoanIntegrationTest { .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(charge1Id), new ChargeData().id(charge2Id)));// + .charges(List.of(new LoanProductChargeData().id(charge1Id), new LoanProductChargeData().id(charge2Id)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId(); diff --git a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java index 6ea8104f2..ea4d852b1 100644 --- a/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java +++ b/integration-tests/src/test/java/org/apache/fineract/integrationtests/loan/repayment/LoanRepaymentTest.java @@ -20,7 +20,7 @@ package org.apache.fineract.integrationtests.loan.repayment; import java.math.BigDecimal; import java.util.List; -import org.apache.fineract.client.models.ChargeData; +import org.apache.fineract.client.models.LoanProductChargeData; import org.apache.fineract.client.models.PostLoanProductsRequest; import org.apache.fineract.client.models.PostLoanProductsResponse; import org.apache.fineract.client.models.PostLoansLoanIdResponse; @@ -69,7 +69,7 @@ public class LoanRepaymentTest extends BaseLoanIntegrationTest { .overAppliedNumber(null)// .overAppliedCalculationType(null)// .multiDisburseLoan(null)// - .charges(List.of(new ChargeData().id(charge1Id), new ChargeData().id(charge2Id)));// + .charges(List.of(new LoanProductChargeData().id(charge1Id), new LoanProductChargeData().id(charge2Id)));// PostLoanProductsResponse loanProductResponse = loanProductHelper.createLoanProduct(product); Long loanProductId = loanProductResponse.getResourceId();