This is an automated email from the ASF dual-hosted git repository.

adamsaghy pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/fineract.git


The following commit(s) were added to refs/heads/develop by this push:
     new a8bbba0b24 FINERACT-2181: Generating the right ChargeData class for 
ChargesApi
a8bbba0b24 is described below

commit a8bbba0b246f5c9c43e82fcdbfc920915cc77cd3
Author: Arnold Galovics <[email protected]>
AuthorDate: Tue Mar 18 19:00:41 2025 +0100

    FINERACT-2181: Generating the right ChargeData class for ChargesApi
---
 .../test/factory/LoanProductsRequestFactory.java   | 20 ++++----
 .../global/LoanProductGlobalInitializerStep.java   | 10 ++--
 .../api/LoanProductsApiResourceSwagger.java        | 54 ++--------------------
 ...ChargeOffWithAdvancedPaymentAllocationTest.java |  4 +-
 ...eseReplayWithAdvancedPaymentAllocationTest.java |  4 +-
 .../LoanPostChargeOffScenariosTest.java            |  4 +-
 .../LoanProductChargeOffReasonMappingsTest.java    |  4 +-
 .../LoanTransactionAccrualActivityPostingTest.java |  4 +-
 .../RepaymentReverseExternalIdTest.java            |  4 +-
 ...ndoRepaymentWithDownPaymentIntegrationTest.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 5dc5cf2fe8..9acfe98445 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -241,7 +241,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -349,7 +349,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -457,7 +457,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -570,7 +570,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -795,7 +795,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -908,7 +908,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -1019,7 +1019,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> feeToIncomeAccountMappings = 
new ArrayList<>();
 
@@ -1129,7 +1129,7 @@ public class LoanProductsRequestFactory {
         List<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 613428d2da..52a9bf34ef 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<ChargeData> charges = new ArrayList<>();
-        charges.add(new 
ChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE.value));
+        List<LoanProductChargeData> 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<ChargeData> chargesInterest = new ArrayList<>();
-        chargesInterest.add(new 
ChargeData().id(ChargeProductType.LOAN_PERCENTAGE_LATE_FEE_AMOUNT_PLUS_INTEREST.value));
+        List<LoanProductChargeData> 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 070a830ff9..955db97c6c 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<ChargeData> charges;
+        public List<LoanProductChargeData> 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<PostLoanProductsRequest.ChargeData> charges;
+        public List<PostLoanProductsRequest.LoanProductChargeData> 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<PostLoanProductsRequest.RateData> 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<String> 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 0d9628efb4..28c3d549de 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 bea33f1f92..e67ba55a59 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 e1a30ffa5a..8a0f6f7a99 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 e7e7a2d4e1..801cd870b1 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 6b1f48df4e..724a760dfc 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 2620cb52a7..0e1c93c6ac 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 9ee09e73a3..803a2101c3 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<Integer> principalVariationsForBorrowerCycle = new ArrayList<>();
         List<Integer> numberOfRepaymentVariationsForBorrowerCycle = new 
ArrayList<>();
         List<Integer> interestRateVariationsForBorrowerCycle = new 
ArrayList<>();
-        List<ChargeData> charges = new ArrayList<>();
+        List<LoanProductChargeData> charges = new ArrayList<>();
         List<ChargeToGLAccountMapper> penaltyToIncomeAccountMappings = new 
ArrayList<>();
         List<GetLoanFeeToIncomeAccountMappings> 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 6c9cd69752..a68c50d120 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 16eb4405ec..4ef88a20b0 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 6ea8104f22..ea4d852b1b 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();


Reply via email to