quickbooks-ruby
quickbooks-ruby copied to clipboard
Intuit alternate JSON response
I empirically observed an intermittent alternate response when testing TaxService#create against an Intuit sandbox. This PR extends the gem to handle both forms of the response.
Typical Intuit response:
{"Fault":{"Error":[{"Message":"Duplicate Name Exists Error","Detail":"The name supplied already exists. : null","code":"6240"}],"type":"ValidationFault"},"time":"2024-06-23T04:29:11.688-07:00"}
Alternate Intuit response:
{"fault":{"error":[{"message":"Duplicate Name Exists Error","detail":"The name supplied already exists. : null","code":"6240"}],"type":"ValidationFault"},"batchItemResponse":[],"attachableResponse":[],"time":1719142418269,"cdcresponse":[]}
(note: the PR additionally adds a small workaround to make test cases pass)