quickbooks-ruby icon indicating copy to clipboard operation
quickbooks-ruby copied to clipboard

Intuit alternate JSON response

Open rchekaluk opened this issue 8 months ago • 0 comments

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)

rchekaluk avatar Jun 23 '24 13:06 rchekaluk