-
Notifications
You must be signed in to change notification settings - Fork 32
Created transfer method endpoint #9
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
Conversation
peter-joseph
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.
Done with review. Please take a look on my code review comments.
|
|
||
| HashMap<String, String> headers = new HashMap<String, String>(); | ||
| headers.put("Json-Cache-Token", jsonCacheToken); | ||
|
|
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.
give space before and after +
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.
done
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.
I think to all + sign to make it balance.
| throw new HyperwalletException("JSON token is required"); | ||
| } | ||
|
|
||
| HyperwalletTransferMethod transferMethod = new HyperwalletTransferMethod(); |
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.
I think we cannot create TransferMethod without Type? i.e. PREPAID_CARD, BANK_ACCOUNT, WIRE_ACCOUNT or PAPER_CHECK
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.
if that is the case we should either not provide this method, or have a default value.
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.
Yep this method for me should be removed since even if we set a default but in this context we cannot know for sure what are the users available transfer methods or the concept of default transfer method to a specific user given only the user token, please also confirm with @fkrauthan-hyperwallet thanks.
|
|
||
| HashMap<String, String> headers = new HashMap<String, String>(); | ||
| headers.put("Json-Cache-Token", jsonCacheToken); | ||
|
|
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.
give space before and after +
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.
done
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.
I think to all + sign to make it balance.
| } | ||
| if (StringUtils.isEmpty(jsonCacheToken)) { | ||
| throw new HyperwalletException("JSON token is required"); | ||
| } |
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.
I think we need to check if transfer method type is set or we rely on service validators?
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.
according to the documentation i was following you are correct.
https://confluence.site1.hyperwallet.local/pages/viewpage.action?pageId=22299508
the other SDKs seem to handle it at the service level.
|
Looks good... |
We need to add the transfer methods endpoint to support the widget use case (it is important to support the json cache token and overriding of any transfer method field). We just need to support creation!