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.
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.
Migrated from https://github.com/qbwc/qbwc/issues/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