FINERACT-2181: Batch API - Add interest pause API
This commit is contained in:
+16
@@ -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");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+13
-1
@@ -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)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user