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

Use consistent types in xml_to_hash #17

Closed
JasonBarnabe opened this issue May 26, 2016 · 1 comment
Closed

Use consistent types in xml_to_hash #17

JasonBarnabe opened this issue May 26, 2016 · 1 comment

Comments

@JasonBarnabe
Copy link
Contributor

Migrated from qbwc/qbwc#52

You query for customers 100 at a time and you have 101 customers in QB. On the first handle_response call, r['customer_ret'] will be an array of 100 customers. On the second call, it will be a hash of a single customer. This sucks to handle - it should always be an array.

One way to implement may be to look for a comment containing "may rep" in the schema in a similar way we currently look up the type - https://github.com/qbwc/qbxml/blob/master/lib/qbxml/hash.rb#L140

@JasonBarnabe
Copy link
Contributor Author

The branch single-element-array has a potential fix. It works for the one unit test I wrote, but I would like to get some testing done in real-world situations.

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