-
Notifications
You must be signed in to change notification settings - Fork 2
CS-1982 | CS-2170: Added ACH endpoints #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: dev
Are you sure you want to change the base?
Conversation
jonmmyers
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good 👍
src/main/java/co/dapi/ACH.java
Outdated
| return resp; | ||
| } | ||
|
|
||
| public static class CreatePull { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to PullTransfer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,11 @@ | |||
| package co.dapi.response; | |||
|
|
|||
| public class CreatePullResponse extends BaseResponse { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to CreateACHPullResponse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| @@ -0,0 +1,26 @@ | |||
| package co.dapi.types; | |||
|
|
|||
| public class PullTransfer { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to ACHPullTransferInfo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
|
||
| import java.util.Optional; | ||
|
|
||
| public class GetPullResponse extends BaseResponse { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to GetACHPullResponse.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| /** | ||
| * 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); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to createACHPull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename to getACHPull.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No description provided.