Skip to content

Commit 570f44a

Browse files
Jose Alberto Hernandezadamsaghy
authored andcommitted
FINERACT-2181: Swagger enhancement for PostSavingsProductsRequest
1 parent 072017c commit 570f44a

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

fineract-e2e-tests-core/src/test/java/org/apache/fineract/test/factory/SavingsProductRequestFactory.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*/
1919
package org.apache.fineract.test.factory;
2020

21-
import java.util.HashSet;
22-
import java.util.Set;
21+
import java.util.ArrayList;
22+
import java.util.List;
2323
import org.apache.fineract.client.models.PostSavingsCharges;
2424
import org.apache.fineract.client.models.PostSavingsProductsRequest;
2525

@@ -43,7 +43,7 @@ public final class SavingsProductRequestFactory {
4343
private SavingsProductRequestFactory() {}
4444

4545
public static PostSavingsProductsRequest defaultSavingsProductRequest() {
46-
Set<PostSavingsCharges> charges = new HashSet<>();
46+
List<PostSavingsCharges> charges = new ArrayList<>();
4747

4848
return new PostSavingsProductsRequest().name(DEFAULT_SAVINGS_PRODUCT_NAME)//
4949
.shortName(DEFAULT_SAVINGS_PRODUCT_SHORT_NAME)//

fineract-provider/src/main/java/org/apache/fineract/portfolio/savings/api/SavingsProductsApiResourceSwagger.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,19 @@ private PostSavingsCharges() {}
6969
public Integer interestCalculationDaysInYearType;
7070
@Schema(example = "1")
7171
public Integer accountingRule;
72-
public Set<PostSavingsCharges> charges;
72+
public List<PostSavingsCharges> charges;
7373
@Schema(example = "accountMappingForPayment")
7474
public String accountMappingForPayment;
75+
@Schema(example = "false")
76+
public Boolean withdrawalFeeForTransfers;
77+
@Schema(example = "false")
78+
public Boolean enforceMinRequiredBalance;
79+
@Schema(example = "false")
80+
public Boolean allowOverdraft;
81+
@Schema(example = "false")
82+
public Boolean withHoldTax;
83+
@Schema(example = "false")
84+
public Boolean isDormancyTrackingActive;
7585
}
7686

7787
@Schema(description = "PostSavingsProductsResponse")

integration-tests/src/test/java/org/apache/fineract/integrationtests/savings/base/BaseSavingsIntegrationTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,12 @@ protected PostSavingsProductsRequest dailyInterestPostingProduct() {
119119
.accountingRule(1) // none
120120
.interestCalculationDaysInYearType(DaysInYearType.DAYS_365).interestCompoundingPeriodType(InterestPeriodType.DAILY)
121121
.interestCalculationType(InterestCalculationType.AVERAGE_DAILY_BALANCE) //
122-
.interestPostingPeriodType(InterestPeriodType.DAILY);//
122+
.interestPostingPeriodType(InterestPeriodType.DAILY) //
123+
.withdrawalFeeForTransfers(false) //
124+
.enforceMinRequiredBalance(false) //
125+
.allowOverdraft(false) //
126+
.withHoldTax(false) //
127+
.isDormancyTrackingActive(false); //
123128
}
124129

125130
protected PostSavingsProductsResponse createProduct(PostSavingsProductsRequest productsRequest) {

0 commit comments

Comments
 (0)