You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fineract.apache.org by GitBox <gi...@apache.org> on 2020/09/15 14:54:21 UTC

[GitHub] [fineract] SubhamPramanik opened a new pull request #1330: Interop KYC and Interop Loan Disbursement

SubhamPramanik opened a new pull request #1330:
URL: https://github.com/apache/fineract/pull/1330


   ## Description
   
   Describe the changes made and why they were made.
   - InteropAPI to get client KYC using account ID
   - Interop API to disburse loan
   
   Ignore if these details are present on the associated [Apache Fineract JIRA ticket](https://github.com/apache/fineract/pull/1284).
   
   
   ## Checklist
   
   Please make sure these boxes are checked before submitting your pull request - thanks!
   
   - [x] Write the commit message as per https://github.com/apache/fineract/#pull-requests
   
   - [x] Acknowledge that we will not review PRs that are not passing the build _("green")_ - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
   
   - [x] Create/update unit or integration tests for verifying the changes made.
   
   - [x] Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.
   
   - [x] Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/api-docs/apiLive.htm with details of any API changes
   
   - [x] Submission is not a "code dump".  (Large changes can be made "in repository" via a branch.  Ask on the developer mailing list for guidance, if required.)
   
   FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.
   


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



[GitHub] [fineract] vorburger commented on pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
vorburger commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-700181157


   @avikganguly01 looks like the review feedback from you here has been addressed? Will you re-review and merge when OK for you? Please use _Squash and Merge_ (notice the drop-down on the green button above), as per https://github.com/apache/fineract#merge-strategy.


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



[GitHub] [fineract] thesmallstar commented on pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
thesmallstar commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-696935962


   @SubhamPramanik  thank you for the PR, I see a checkstyle error in your code, that means address_line_1 that you made does not match the required regex it should.
   
   I also see a AvoidHidingCauseException, that happens when you catch a exception and throw another exception essentially hiding what actually caused the exception! 
   
   Will you fix this?
   
   cc @vorburger The checkstyles are helping!!
   


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



[GitHub] [fineract] avikganguly01 commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
avikganguly01 commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r490098735



##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
##########
@@ -373,4 +374,29 @@ public String performTransfer(@QueryParam("action") @Parameter(description = "ac
 
         return jsonSerializer.serialize(settings, result);
     }
+
+    @GET
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    @Path("accounts/{accountId}/kyc")
+    @Operation(summary = "Query KYC by Account Id", description = "")
+    @ApiResponses({
+            @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropKycResponseData.class))) })
+    public String getClientKyc(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) {
+        InteropKycResponseData result = interopService.getKyc(accountId);
+        ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

Review comment:
       Check permission for this action and entity (READ - CLIENTIDENTIFIER) ...context.authenticatedUser().validateHasReadPermission(ENTITY_NAME);
   

##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java
##########
@@ -437,6 +550,19 @@ private SavingsAccount validateAndGetSavingAccount(@NotNull InteropRequestData r
         return savingsAccount;
     }
 
+    // private Loan validateAndGetLoan(@NotNull InteropRequestData request) {

Review comment:
       Remove this if you're not planning to use it.




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



[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073446



##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java
##########
@@ -437,6 +550,19 @@ private SavingsAccount validateAndGetSavingAccount(@NotNull InteropRequestData r
         return savingsAccount;
     }
 
+    // private Loan validateAndGetLoan(@NotNull InteropRequestData request) {

Review comment:
       Removed




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



[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073780



##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
##########
@@ -373,4 +374,29 @@ public String performTransfer(@QueryParam("action") @Parameter(description = "ac
 
         return jsonSerializer.serialize(settings, result);
     }
+
+    @GET
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    @Path("accounts/{accountId}/kyc")
+    @Operation(summary = "Query KYC by Account Id", description = "")
+    @ApiResponses({
+            @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropKycResponseData.class))) })
+    public String getClientKyc(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) {
+        InteropKycResponseData result = interopService.getKyc(accountId);
+        ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

Review comment:
       Not sure how to do it. Can you point to a refernce implementation? 




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



[GitHub] [fineract] SubhamPramanik commented on a change in pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
SubhamPramanik commented on a change in pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#discussion_r493073446



##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/service/InteropServiceImpl.java
##########
@@ -437,6 +550,19 @@ private SavingsAccount validateAndGetSavingAccount(@NotNull InteropRequestData r
         return savingsAccount;
     }
 
+    // private Loan validateAndGetLoan(@NotNull InteropRequestData request) {

Review comment:
       Removed

##########
File path: fineract-provider/src/main/java/org/apache/fineract/interoperation/api/InteropApiResource.java
##########
@@ -373,4 +374,29 @@ public String performTransfer(@QueryParam("action") @Parameter(description = "ac
 
         return jsonSerializer.serialize(settings, result);
     }
+
+    @GET
+    @Consumes({ MediaType.APPLICATION_JSON })
+    @Produces({ MediaType.APPLICATION_JSON })
+    @Path("accounts/{accountId}/kyc")
+    @Operation(summary = "Query KYC by Account Id", description = "")
+    @ApiResponses({
+            @ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = InteropKycResponseData.class))) })
+    public String getClientKyc(@PathParam("accountId") @Parameter(description = "accountId") String accountId, @Context UriInfo uriInfo) {
+        InteropKycResponseData result = interopService.getKyc(accountId);
+        ApiRequestJsonSerializationSettings settings = this.apiRequestParameterHelper.process(uriInfo.getQueryParameters());

Review comment:
       Not sure how to do it. Can you point to a refernce implementation? 




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



[GitHub] [fineract] avikganguly01 commented on pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
avikganguly01 commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-694105848


   @SubhamPramanik Can you fix the checkstyle violations?


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



[GitHub] [fineract] avikganguly01 merged pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
avikganguly01 merged pull request #1330:
URL: https://github.com/apache/fineract/pull/1330


   


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



[GitHub] [fineract] thesmallstar commented on pull request #1330: Interop KYC and Interop Loan Disbursement

Posted by GitBox <gi...@apache.org>.
thesmallstar commented on pull request #1330:
URL: https://github.com/apache/fineract/pull/1330#issuecomment-696935962


   @SubhamPramanik  thank you for the PR, I see a checkstyle error in your code, that means address_line_1 that you made does not match the required regex it should.
   
   I also see a AvoidHidingCauseException, that happens when you catch a exception and throw another exception essentially hiding what actually caused the exception! 
   
   Will you fix this?
   
   cc @vorburger The checkstyles are helping!!
   


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