Ruby on rails - trying to create estimate_items within estimates

Thanks again for the response, this seems a strange one!

So I’ve just done a post from the rails project and got the same error:

2016-02-01 10:00:29 +0000

same nondescript OAuth2::Error.

this DOES work with a curl request in the command line:

curl -H “Authorization: Bearer *******” -H “Accept: application/xml” -H
“Content-type: application/json” https://api.freeagent.com/v2/estimates -X
POST -d '{

“estimate”:{

“contact”: “Log in to your FreeAgent account****”,

“status”: “Draft”,

“currency”: “GBP”,

“project” : “Log in to your FreeAgent account****”,

“estimate_type” : “Estimate”, “estimate_items”:
[{“item_type”:“Hours”,“quantity”:“1.03333333”,“price”:“12.2”,“description”:“sada”,“sales_tax_value”:“20.0”}],

“dated_on” : “2015-01-31T00:00:00+00:00”}

}’

Created at: 2016-02-01T12:11:09Z

any ideas on why the ruby syntax fails?