Skip to content
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

Inconsistent find() behavior #34

Open
ssimms opened this issue Apr 22, 2019 · 0 comments
Open

Inconsistent find() behavior #34

ssimms opened this issue Apr 22, 2019 · 0 comments

Comments

@ssimms
Copy link

ssimms commented Apr 22, 2019

In WebService::Braintree::Customer, both create() and find() are supposed to return a Result object with the customer() method available, according to the POD. create() does this as expected, but find() returns the actual customer object instead.

Looking through the various Gateway modules, most of the find() methods return a Result object, but three don't:

  • CustomerGateway
  • MerchantAccountGateway
  • SubscriptionGateway

Changing these three to match the rest will break existing code, but that probably makes more sense than having some modules work one way and some another (which is how I found the inconsistency). The fix is to remove the ->customer or equivalent call after _make_request in each module's find() method.

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

No branches or pull requests

1 participant