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

Avoid returning the same InvoiceID (a.o.) for all payments from get_payments #151

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jomz
Copy link

@jomz jomz commented Dec 5, 2019

The XPaths used ("//SomeElement") made any node within the response match, but you only want to match from the child nodes...
Test included.

This is a cleaned up version of PR #150; minus the commit that made the library 1.8 compatible again.

jomz added 2 commits December 23, 2019 18:52
This breaks all payments tests as get_payment assumed Invoice.InvoiceNumber to not be nil...
@jomz
Copy link
Author

jomz commented Dec 23, 2019

Ran into a new issue with get_payments getting the proper InvoiceID and -Number;
Results from get_payments may not have a InvoiceNumber specified, so my patched version was throwing a NoMethodError for nil:NilClass.
7a62bda will break the tests but only with the patched get_payments (because upstream will return the first InvoiceNumber it finds for all results).
bb5a510 makes tests pass again.

jomz added a commit to nzffa/xero_gateway that referenced this pull request Dec 23, 2019
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.

1 participant