Skip to content

Conversation

@kc-sabal
Copy link
Contributor

No description provided.

@kc-sabal kc-sabal requested a review from jonmmyers January 12, 2023 07:31
Copy link
Contributor

@jonmmyers jonmmyers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@kc-sabal kc-sabal changed the title CS-1982: Added ACH pull CS-1982 | CS-2170: Added ACH endpoints Jan 25, 2023
@kc-sabal kc-sabal requested a review from jonmmyers January 25, 2023 12:25
@jonmmyers jonmmyers requested a review from asmsh February 1, 2023 05:37
return resp;
}

public static class CreatePull {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to PullTransfer.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to CreateACHPullResponse.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to ACHPullTransferInfo.

Copy link
Contributor Author

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to GetACHPullResponse.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
}
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to createACHPull.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* @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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename to getACHPull.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kc-sabal kc-sabal self-assigned this Feb 10, 2023
@kc-sabal kc-sabal requested a review from asmsh February 13, 2023 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants