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 711aa7910e FINERACT-2181: Batch API - Add interest pause API
711aa7910e is described below
commit 711aa7910eb1b3ce5636c2ec3798def708f74bbd
Author: Adam Saghy <[email protected]>
AuthorDate: Thu Jul 10 13:22:24 2025 +0200
FINERACT-2181: Batch API - Add interest pause API
---
.../fineract/batch/command/CommandStrategyProvider.java | 16 ++++++++++++++++
.../batch/command/CommandStrategyProviderTest.java | 14 +++++++++++++-
2 files changed, 29 insertions(+), 1 deletion(-)
diff --git
a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java
b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java
index bfa7bf0d9f..d7f39f1fd2 100644
---
a/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java
+++
b/fineract-core/src/main/java/org/apache/fineract/batch/command/CommandStrategyProvider.java
@@ -227,6 +227,22 @@ public class CommandStrategyProvider {
commandStrategies.put(CommandContext
.resource("v1\\/datatables\\/" +
ALPHANUMBERIC_WITH_UNDERSCORE_REGEX + "\\/query" +
MANDATORY_QUERY_PARAM_REGEX).method(GET)
.build(), "getDatatableEntryByQueryCommandStrategy");
+ commandStrategies.put(CommandContext.resource("v1\\/loans\\/" +
NUMBER_REGEX + "\\/interest-pauses").method(GET).build(),
+ "getLoanInterestPausesByExternalIdCommandStrategy");
+ commandStrategies.put(CommandContext.resource("v1\\/loans\\/" +
NUMBER_REGEX + "\\/interest-pauses").method(POST).build(),
+ "createLoanInterestPauseByExternalIdCommandStrategy");
+ commandStrategies.put(
+ CommandContext.resource("v1\\/loans\\/" + NUMBER_REGEX +
"\\/interest-pauses\\/" + NUMBER_REGEX).method(PUT).build(),
+ "updateLoanInterestPauseByExternalIdCommandStrategy");
+ commandStrategies.put(
+ CommandContext.resource("v1\\/loans\\/external-id\\/" +
UUID_PARAM_REGEX + "\\/interest-pauses").method(GET).build(),
+ "getLoanInterestPausesByExternalIdCommandStrategy");
+ commandStrategies.put(
+ CommandContext.resource("v1\\/loans\\/external-id\\/" +
UUID_PARAM_REGEX + "\\/interest-pauses").method(POST).build(),
+ "createLoanInterestPauseByExternalIdCommandStrategy");
+ commandStrategies.put(CommandContext
+ .resource("v1\\/loans\\/external-id\\/" + UUID_PARAM_REGEX +
"\\/interest-pauses\\/" + NUMBER_REGEX).method(PUT).build(),
+ "updateLoanInterestPauseByExternalIdCommandStrategy");
}
}
diff --git
a/fineract-provider/src/test/java/org/apache/fineract/batch/command/CommandStrategyProviderTest.java
b/fineract-provider/src/test/java/org/apache/fineract/batch/command/CommandStrategyProviderTest.java
index b51d8a6bc6..b2b815d0ea 100644
---
a/fineract-provider/src/test/java/org/apache/fineract/batch/command/CommandStrategyProviderTest.java
+++
b/fineract-provider/src/test/java/org/apache/fineract/batch/command/CommandStrategyProviderTest.java
@@ -194,7 +194,19 @@ public class CommandStrategyProviderTest {
Arguments.of("datatables/test_dt_table/query?columnFilter=id&valueFilter=12&resultColumns=id",
HttpMethod.GET,
"getDatatableEntryByQueryCommandStrategy",
mock(GetDatatableEntryByQueryCommandStrategy.class)),
Arguments.of("datatables/test_dt_table/query?columnFilter=custom_id&valueFilter=10a62-d438-2319&resultColumns=id",
- HttpMethod.GET,
"getDatatableEntryByQueryCommandStrategy",
mock(GetDatatableEntryByQueryCommandStrategy.class)));
+ HttpMethod.GET,
"getDatatableEntryByQueryCommandStrategy",
mock(GetDatatableEntryByQueryCommandStrategy.class)),
+ Arguments.of("loans/123/interest-pauses", HttpMethod.GET,
"getLoanInterestPausesByExternalIdCommandStrategy",
+ mock(CommandStrategy.class)),
+ Arguments.of("loans/123/interest-pauses", HttpMethod.POST,
"createLoanInterestPauseByExternalIdCommandStrategy",
+ mock(CommandStrategy.class)),
+ Arguments.of("loans/123/interest-pauses/123", HttpMethod.PUT,
"updateLoanInterestPauseByExternalIdCommandStrategy",
+ mock(CommandStrategy.class)),
+
Arguments.of("loans/external-id/8dfad438-2319-48ce-8520-10a62801e9a1/interest-pauses",
HttpMethod.GET,
+ "getLoanInterestPausesByExternalIdCommandStrategy",
mock(CommandStrategy.class)),
+
Arguments.of("loans/external-id/8dfad438-2319-48ce-8520-10a62801e9a1/interest-pauses",
HttpMethod.POST,
+ "createLoanInterestPauseByExternalIdCommandStrategy",
mock(CommandStrategy.class)),
+
Arguments.of("loans/external-id/8dfad438-2319-48ce-8520-10a62801e9a1/interest-pauses/123",
HttpMethod.PUT,
+ "updateLoanInterestPauseByExternalIdCommandStrategy",
mock(CommandStrategy.class)));
}
/**