-
Notifications
You must be signed in to change notification settings - Fork 0
Feat/ach pull #11
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: master
Are you sure you want to change the base?
Feat/ach pull #11
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.
Couple things missing here, also I'd like @asmsh to review since I'm not that familiar with Java
src/Dapi/DapiApp.cs
Outdated
| /// <summary> | ||
| /// createACHPull talks to the CreateACHPull endpoint of Dapi, with this DapiApp's appSecret. | ||
| /// </summary> | ||
| /// | ||
| /// <param name="transfer"> | ||
| /// the details of the transfer that should be initiate. | ||
| /// </param> | ||
| /// <param name="accessToken"> | ||
| /// retrieved from the ExchangeToken process. | ||
| /// </param> | ||
| /// <param name="userSecret"> | ||
| /// retrieved from the user login. | ||
| /// </param> | ||
| public CreateACHPullResponse createACHPull(ACH.ACHPull transfer, string accessToken, string userSecret) { | ||
| return this.c.createACHPull(transfer, accessToken, userSecret, "", null); | ||
| } | ||
|
|
||
| /// <summary> | ||
| /// createACHPull talks to the CreateACHPull endpoint of Dapi, with this DapiApp's appSecret. | ||
| /// </summary> | ||
| /// <param name="userSecret"> | ||
| /// retrieved from the user login. | ||
| /// </param> | ||
| public GetACHPullResponse getACHPull(string accessToken, string userSecret) { | ||
| return this.c.getACHPull(accessToken, userSecret, "", null); | ||
| } | ||
|
|
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.
Move them to be after the getAccountsMetadata method.
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.
Both methods should have 2 versions, one that has the operationID and userInputs parameters, and one that doesn't.
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.
Also, in the case of getACHPull, the operationID has to be always passed, as it's a required field for the endpoint.
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/Dapi/Products/ACH.cs
Outdated
| return respBody ?? new GetACHPullResponse("UNEXPECTED_RESPONSE", "Unexpected response body"); | ||
| } | ||
|
|
||
| public class ACHPull { |
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.
src/Dapi/Products/ACH.cs
Outdated
| this.senderID = transfer.senderID; | ||
| this.amount = transfer.amount; | ||
| this.description = transfer.description; |
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.
This will not work. These fields should be inside the transfer object field, not directly in the root.
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.
| /// This is a private constructor to this lib. | ||
| /// </summary> | ||
| [JsonConstructor] | ||
| internal CreateACHPullResponse(APIStatus status, bool success, string operationID) : |
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.
This constructor is missing the userInputs, type and msg fields.
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/Dapi/Types/ACHGetTransfer.cs
Outdated
| @@ -0,0 +1,13 @@ | |||
| namespace Dapi.Types { | |||
| public class ACHGetTransfer { | |||
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 it 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.
| /// This is a private constructor to this lib. | ||
| /// </summary> | ||
| [JsonConstructor] | ||
| internal GetACHPullResponse(ACHGetTransfer transfer, string reference, APIStatus status, bool success, string operationID) : |
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.
This constructor is missing the userInputs, type and msg fields.
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.