Conversation
jonmmyers
approved these changes
Jan 30, 2023
asmsh
suggested changes
Feb 10, 2023
src/main/java/co/dapi/ACH.java
Outdated
| return resp; | ||
| } | ||
|
|
||
| public static class CreatePull { |
| @@ -0,0 +1,11 @@ | |||
| package co.dapi.response; | |||
|
|
|||
| public class CreatePullResponse extends BaseResponse { | |||
Contributor
There was a problem hiding this comment.
Rename to CreateACHPullResponse.
| @@ -0,0 +1,26 @@ | |||
| package co.dapi.types; | |||
|
|
|||
| public class PullTransfer { | |||
Contributor
There was a problem hiding this comment.
Rename to ACHPullTransferInfo.
|
|
||
| import java.util.Optional; | ||
|
|
||
| public class GetPullResponse extends BaseResponse { |
Contributor
There was a problem hiding this comment.
Rename to GetACHPullResponse.
Comment on lines
303
to
333
| /** | ||
| * createPull talks to the CreatePull endpoint of Dapi, with this {@link DapiApp}'s appSecret, | ||
| * to continue a previous operation that required to provide some userInputs. | ||
| * | ||
| * @param transfer the transfer details that we want to initiate. | ||
| * @param accessToken retrieved from the ExchangeToken process. | ||
| * @param userSecret retrieved from the user login. | ||
| * @param operationID retrieved from the previous call's response. | ||
| * @param userInputs built from the previous call's response, and the required user input. | ||
| * @return an {@link CreatePullResponse}. | ||
| * @throws IOException in case of trouble happened while executing the request or reading the response. | ||
| */ | ||
| public CreatePullResponse createPull(ACH.CreatePull transfer, String accessToken, String userSecret, String operationID, UserInput[] userInputs) throws IOException { | ||
| return this.ach.createPull(transfer, accessToken, userSecret, operationID, userInputs); | ||
| } | ||
|
|
||
|
|
||
| /** | ||
| * getPull talks to the GetPull endpoint of Dapi, with this {@link DapiApp}'s appSecret, | ||
| * to continue a previous operation that required to provide some userInputs. | ||
| * | ||
| * @param accessToken retrieved from the ExchangeToken process. | ||
| * @param userSecret retrieved from the user login. | ||
| * @param operationID OperationID of the createPull request | ||
| * @param userInputs built from the previous call's response, and the required user input. | ||
| * @return an {@link GetPullResponse}. | ||
| * @throws IOException in case of trouble happened while executing the request or reading the response. | ||
| */ | ||
| public GetPullResponse getPull(String accessToken, String userSecret, String operationID, UserInput[] userInputs) throws IOException { | ||
| return this.ach.getPull(accessToken, userSecret, operationID, userInputs); | ||
| } |
Contributor
There was a problem hiding this comment.
Each method should an extra overloaded version, one that doesn't accept the operationID and userInputs, for the case of createPull, but for getPull is should not accept only userInputs.
src/main/java/co/dapi/DapiApp.java
Outdated
| * @return an {@link CreatePullResponse}. | ||
| * @throws IOException in case of trouble happened while executing the request or reading the response. | ||
| */ | ||
| public CreatePullResponse createPull(ACH.CreatePull transfer, String accessToken, String userSecret, String operationID, UserInput[] userInputs) throws IOException { |
src/main/java/co/dapi/DapiApp.java
Outdated
| * @return an {@link GetPullResponse}. | ||
| * @throws IOException in case of trouble happened while executing the request or reading the response. | ||
| */ | ||
| public GetPullResponse getPull(String accessToken, String userSecret, String operationID, UserInput[] userInputs) throws IOException { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.