fineract-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [fineract] nikpawar89 commented on a change in pull request #738: GSIM and GLIM with test cases (FINERACT-603)
Date Sun, 19 Apr 2020 17:56:56 GMT
nikpawar89 commented on a change in pull request #738: GSIM and GLIM with test cases (FINERACT-603)
URL: https://github.com/apache/fineract/pull/738#discussion_r410957295
 
 

 ##########
 File path: fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/api/LoansApiResource.java
 ##########
 @@ -848,59 +862,121 @@ public String deleteLoanApplication(@PathParam("loanId") @ApiParam(value
= "loan
         return this.toApiJsonSerializer.serialize(result);
     }
 
+
+    @GET
+    @Path("glimAccount/{glimId}")
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    public String getGlimRepaymentTemplate(@PathParam("glimId") final Long glimId,@Context
final UriInfo uriInfo)
+    {
+          this.context.authenticatedUser().validateHasReadPermission(this.resourceNameForPermissions);
+          Collection<GlimRepaymentTemplate> glimRepaymentTemplate=this.glimAccountInfoReadPlatformService.findglimRepaymentTemplate(glimId);
+          final ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());
+         return this.glimTemplateToApiJsonSerializer.serialize(settings, glimRepaymentTemplate,
this.GLIM_ACCOUNTS_DATA_PARAMETERS);
+
+    }
+
+
     @POST
-    @Path("{loanId}")
+    @Path("glimAccount/{glimId}")
     @Consumes({ MediaType.APPLICATION_JSON })
     @Produces({ MediaType.APPLICATION_JSON })
+
     @ApiOperation(value = "Approve Loan Application | Recover Loan Guarantee | Undo Loan
Application Approval | Assign a Loan Officer | Unassign a Loan Officer | Reject Loan Application
| Applicant Withdraws from Loan Application | Disburse Loan Disburse Loan To Savings Account
| Undo Loan Disbursal", httpMethod = "POST", notes = "Approve Loan Application:\n" + "Mandatory
Fields: approvedOnDate\n" + "Optional Fields: approvedLoanAmount and expectedDisbursementDate\n"
+ "Approves the loan application\n\n" + "Recover Loan Guarantee:\n" + "Recovers the loan guarantee\n\n"
+ "Undo Loan Application Approval:\n" + "Undoes the Loan Application Approval\n\n" + "Assign
a Loan Officer:\n" + "Allows you to assign Loan Officer for existing Loan.\n\n" + "Unassign
a Loan Officer:\n" + "Allows you to unassign the Loan Officer.\n\n" + "Reject Loan Application:\n"
+ "Mandatory Fields: rejectedOnDate\n" + "Allows you to reject the loan application\n\n" +
"Applicant Withdraws from Loan Application:\n" + "Mandatory Fields: withdrawnOnDate\n" + "Allows
the applicant to withdraw the loan application\n\n" + "Disburse Loan:\n" + "Mandatory Fields:
actualDisbursementDate\n" + "Optional Fields: transactionAmount and fixedEmiAmount\n" + "Disburses
the Loan\n\n" + "Disburse Loan To Savings Account:\n" + "Mandatory Fields: actualDisbursementDate\n"
+ "Optional Fields: transactionAmount and fixedEmiAmount\n" + "Disburses the loan to Saving
Account\n\n" + "Undo Loan Disbursal:\n" + "Undoes the Loan Disbursal\n" + "Showing request
and response for Assign a Loan Officer")
     @ApiImplicitParams({@ApiImplicitParam(value = "body", required = true, paramType = "body",
dataType = "body", format = "body", dataTypeClass = LoansApiResourceSwagger.PostLoansLoanIdRequest.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "OK", response = LoansApiResourceSwagger.PostLoansLoanIdResponse.class)})
-    public String stateTransitions(@PathParam("loanId") @ApiParam(value = "loanId") final
Long loanId, @QueryParam("command") @ApiParam(value = "command") final String commandParam,
 
 Review comment:
   I think this swagger end point here was for Loan StateTransition, please switch the position
of glimStateTransitions with stateTransitions. Later, you can add swagger end point for your
API as well.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message