kulminsky commented on code in PR #4235:
URL: https://github.com/apache/fineract/pull/4235#discussion_r1905225961


##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java:
##########
@@ -114,4 +117,38 @@ public List<InterestPauseResponseDto> 
retrieveInterestPausesByExternalId(
 
         return 
this.interestPauseReadPlatformService.retrieveInterestPauses(loanExternalId);
     }
+
+    @DELETE
+    @Path("/{loanId}/interest-pauses/{variationId}")
+    @Operation(summary = "Delete an interest pause period", description = 
"Deletes a specific interest pause period by its variation ID.")
+    @ApiResponses({ @ApiResponse(responseCode = "204", description = "No 
Content") })
+    public Response deleteInterestPause(@PathParam("loanId") 
@Parameter(description = "loanId") final Long loanId,
+            @PathParam("variationId") @Parameter(description = "variationId") 
final Long variationId) {
+
+        
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);

Review Comment:
   Changed



##########
fineract-loan/src/main/java/org/apache/fineract/portfolio/interestpauses/api/LoanInterestPauseApiResource.java:
##########
@@ -114,4 +117,38 @@ public List<InterestPauseResponseDto> 
retrieveInterestPausesByExternalId(
 
         return 
this.interestPauseReadPlatformService.retrieveInterestPauses(loanExternalId);
     }
+
+    @DELETE
+    @Path("/{loanId}/interest-pauses/{variationId}")
+    @Operation(summary = "Delete an interest pause period", description = 
"Deletes a specific interest pause period by its variation ID.")
+    @ApiResponses({ @ApiResponse(responseCode = "204", description = "No 
Content") })
+    public Response deleteInterestPause(@PathParam("loanId") 
@Parameter(description = "loanId") final Long loanId,
+            @PathParam("variationId") @Parameter(description = "variationId") 
final Long variationId) {
+
+        
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);
+
+        final CommandWrapper commandRequest = new 
CommandWrapperBuilder().deleteInterestPause(loanId, variationId).build();
+
+        
this.commandsSourceWritePlatformService.logCommandSource(commandRequest);
+
+        return Response.noContent().build();
+    }
+
+    @PUT
+    @Path("/{loanId}/interest-pauses/{variationId}")
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    @Operation(summary = "Update an interest pause period", description = 
"Updates a specific interest pause period by its variation ID.")
+    @ApiResponses({ @ApiResponse(responseCode = "200", description = "OK") })
+    public CommandProcessingResult updateInterestPause(@PathParam("loanId") 
@Parameter(description = "loanId") final Long loanId,
+            @PathParam("variationId") @Parameter(description = "variationId") 
final Long variationId,
+            @RequestBody(required = true) final InterestPauseRequestDto 
request) {
+
+        
this.context.authenticatedUser().validateHasReadPermission(RESOURCE_NAME_FOR_PERMISSIONS);

Review Comment:
   Changed



-- 
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