adamsaghy commented on code in PR #6000:
URL: https://github.com/apache/fineract/pull/6000#discussion_r3441253336


##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloannearbreach/api/WorkingCapitalNearBreachApiResource.java:
##########
@@ -108,4 +119,64 @@ public CommandProcessingResult 
delete(@PathParam("breachId") @Parameter(descript
         final CommandWrapper commandRequest = new 
CommandWrapperBuilder().deleteWorkingCapitalNearBreach(breachId).build();
         return 
this.commandSourceWritePlatformService.logCommandSource(commandRequest);
     }
+
+    @PUT
+    @Path("loans/{loanId}/config")

Review Comment:
   Please change endpoint from `loans/{loanId}/config` to 
`loans/{loanId}/near-breach-config`



##########
fineract-working-capital-loan/src/main/java/org/apache/fineract/portfolio/workingcapitalloannearbreach/api/WorkingCapitalNearBreachApiResource.java:
##########
@@ -108,4 +119,64 @@ public CommandProcessingResult 
delete(@PathParam("breachId") @Parameter(descript
         final CommandWrapper commandRequest = new 
CommandWrapperBuilder().deleteWorkingCapitalNearBreach(breachId).build();
         return 
this.commandSourceWritePlatformService.logCommandSource(commandRequest);
     }
+
+    @PUT
+    @Path("loans/{loanId}/config")
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    @Operation(operationId = "updateWorkingCapitalLoanNearBreachConfigById", 
summary = "Update near breach configuration for an active Working Capital 
Loan", description = "Overrides the near breach threshold and frequency for the 
loan. Applies only to future evaluation periods; history is preserved.")
+    @RequestBody(required = true, content = @Content(schema = 
@Schema(implementation = 
WorkingCapitalLoanApiResourceSwagger.PutWorkingCapitalLoansLoanIdNearBreachConfigRequest.class)))
+    public CommandProcessingResult updateNearBreachConfigById(
+            @PathParam("loanId") @Parameter(description = "loanId", required = 
true) final Long loanId,
+            @Parameter(hidden = true) final String apiRequestBodyAsJson) {
+        return updateNearBreachConfig(loanId, null, apiRequestBodyAsJson);
+    }
+
+    @PUT
+    @Path("loans/external-id/{loanExternalId}/config")

Review Comment:
   Please change endpoint from `loans/external-id/{loanExternalId}/config` to 
`loans/external-id/{loanExternalId}/near-breach-config`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to