braintree / braintree_java

Braintree Java library
https://developer.paypal.com/braintree/docs/start/overview
MIT License
158 stars 98 forks source link

fix(PaymentMethodNonce): wrap nonce in result in #find #54

Closed tagoro9 closed 7 years ago

tagoro9 commented 7 years ago

The docs for the java SDK indicate that the PaymentMethodNonce.find() method returns a Result, but the code is returning a PaymentMethodNonce.

By looking at the implementation in Ruby, it looks like it is wrapping the nonce in a result. So I guess there is a bug in the java SDK.

Please, ignore this PR if the class has the expected behavior. If so, I don't know how to suggest an edit to the docs so they reflect what the code is actually doing.

Thanks.

EvanHahn commented 7 years ago

You're right—our docs are wrong. find is supposed to return a PaymentMethodNonce but is documented incorrectly.

We'll close this issue once our docs are fixed.

bluk commented 7 years ago

@tagoro9 Hi, sorry for the delay. https://developers.braintreepayments.com/reference/request/payment-method-nonce/find/java should be updated with the correct docs. Thanks for reporting the issue.

tagoro9 commented 7 years ago

No problem. Thanks for fixing it!