--- http_interactions: - request: method: post uri: https://sandbox-rest.avatax.com/api/v2/transactions/create body: encoding: UTF-8 string: '{"type":"SalesInvoice","code":"R680546408","referenceCode":"R680546408","companyCode":"test1","date":"2019-09-20","customerCode":"betsy@schneider.us","addresses":{"ShipFrom":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600 Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product #23 - 6605","itemCode":"SKU-23"},{"number":"FR-bdb56466-77dd-4dfb-bf58-0cf5dfccf08b","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546408"}' headers: Accept: - application/json; charset=utf-8 User-Agent: - AvaTax Ruby Gem 19.7.0 X-Avalara-Client: - a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0; Authorization: - "" Content-Type: - application/json Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 response: status: code: 400 message: Bad Request headers: Date: - Fri, 20 Sep 2019 09:03:08 GMT Content-Type: - application/json; charset=utf-8 Transfer-Encoding: - chunked Connection: - keep-alive X-Content-Type-Options: - nosniff Serverduration: - '00:00:00.3534326' body: encoding: UTF-8 string: '{"error":{"code":"GetTaxError","message":"DocStatus is invalid for this operation.","target":"Unknown","details":[{"code":"GetTaxError","number":300,"message":"DocStatus is invalid for this operation.","description":"Expected Saved|Posted","faultCode":"GetTaxError","helpLink":"http://developer.avalara.com/avatax/errors/GetTaxError","refersTo":"DocStatus","severity":"Error"}]}}' http_version: recorded_at: Fri, 20 Sep 2019 09:03:08 GMT - request: method: post uri: https://sandbox-rest.avatax.com/api/v2/companies/test1/transactions/R680546408/adjust body: encoding: UTF-8 string: '{"adjustmentReason":"","adjustmentDescription":"","newTransaction":{"type":"SalesInvoice","code":"R680546408","referenceCode":"R680546408","companyCode":"test1","date":"2019-09-20","customerCode":"betsy@schneider.us","addresses":{"ShipFrom":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"USA","postalCode":"19147"},"ShipTo":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"lines":[{"number":"LI-a844605f-e114-4933-a0cf-7a434ac83cdf","quantity":1,"amount":"10.0","taxCode":"P0000000","discounted":false,"addresses":{"ShipFrom":{"line1":"1600 Pennsylvania Ave NW","line2":null,"city":"Washington","region":"PA","country":"US","postalCode":"20500"},"ShipTo":{"line1":"822 Reed St","line2":"","city":"Philadelphia","region":"PA","country":"US","postalCode":"19147"}},"taxIncluded":false,"description":"Product #23 - 6605","itemCode":"SKU-23"},{"number":"FR-bdb56466-77dd-4dfb-bf58-0cf5dfccf08b","quantity":1,"amount":"100.0","taxCode":"FR","discounted":false,"addresses":{},"taxIncluded":false}],"commit":true,"discount":"0.0","currencyCode":"USD","purchaseOrderNo":"R680546408"}}' headers: Accept: - application/json; charset=utf-8 User-Agent: - AvaTax Ruby Gem 19.7.0 X-Avalara-Client: - a0o0b000005HsXPAA0;Spree by Spark;RubySdk;19.7.0; Authorization: - "" Content-Type: - application/json Accept-Encoding: - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 response: status: code: 400 message: Bad Request headers: Date: - Fri, 20 Sep 2019 09:03:09 GMT Content-Type: - application/json; charset=utf-8 Transfer-Encoding: - chunked Connection: - keep-alive X-Content-Type-Options: - nosniff Serverduration: - '00:00:00.0005202' body: encoding: UTF-8 string: '{"error":{"code":"ModelStateInvalid","message":"The request body did not contain valid JSON.","target":"HttpRequest","details":[{"code":"JsonFormatError","number":47,"message":"The request body did not contain valid JSON.","description":"At line 1 position 22: Error converting value \"\" to type ''Avalara.AvaTax.Enums.AdjustmentReason''. Path ''adjustmentReason''","faultCode":"Client","helpLink":"http://developer.avalara.com/avatax/errors/JsonFormatError","severity":"Error"}]}}' http_version: recorded_at: Fri, 20 Sep 2019 09:03:09 GMT recorded_with: VCR 4.0.0