Because the /ledgers endpoint does not return an encapsulating data node in the json response, it breaks our assumption and causes a TypeError at runtime.
Test Case:
client.get(path: "ledgers/BTC?startDate=2015-01-01&endDate=2015-02-01&token=#{client.instance_variable_get(:@tokens)['merchant']}")
Proposed Fix: Add if/then logic to include full body if no [data] element is found
Because the
/ledgers
endpoint does not return an encapsulatingdata
node in the json response, it breaks our assumption and causes aTypeError
at runtime.Test Case:
client.get(path: "ledgers/BTC?startDate=2015-01-01&endDate=2015-02-01&token=#{client.instance_variable_get(:@tokens)['merchant']}")
Proposed Fix: Add if/then logic to include full body if no [data] element is found