We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
var item = { Name: 'FOO', Sku: 10, UnitPrice: 1, PurchaseCost: 0.5, Type: 'Inventory', TrackQtyOnHand: true, QtyOnHand: 'Sku', InvStartDate: '2016-01-30', IncomeAccountRef: { name: 'Sales', value: '1' }, ExpenseAccountRef: { name: 'Supplies', value: '21' }, AssetAccountRef: { name: 'Uncategorized Asset', value: '53' } }; var deferred = Q.defer(); var qbo = new QuickBooks(global['quickbooks_key'], global['quickbooks_secret'], token, token_secret, realm_id, false, // don't use the sandbox (i.e. for testing) true); // turn debugging on qbo.createItem(item, function (err, res) { if (err) { return deferred.reject(new Error(JSON.stringify(err))); } deferred.resolve(res); }); return deferred.promise;
{ request: { uri: 'https://quickbooks.api.intuit.com/v3/company/redacted/item?minorversion=4', method: 'POST', headers: { 'User-Agent': 'node-quickbooks: version 2.0.3', host: 'quickbooks.api.intuit.com', accept: 'application/json', 'content-type': 'application/json', 'content-length': 306, Authorization: 'OAuth oauth_consumer_key="redacted",oauth_nonce="redacted",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1454182385",oauth_token="redacted",oauth_version="1.0",oauth_signature="redacted"' }, body: '{"Name":"FOO","Sku":10,"UnitPrice":1,"PurchaseCost":0.5,"Type":"Inventory","TrackQtyOnHand":true,"QtyOnHand":"Sku","InvStartDate":"2016-01-30","IncomeAccountRef":{"name":"Sales","value":"1"},"ExpenseAccountRef":{"name":"Supplies","value":"21"},"AssetAccountRef":{"name":"Uncategorized Asset","value":"53"}}' } }
The text was updated successfully, but these errors were encountered:
The error messages you get back from the actual api sometimes are really poor. I think this should work if you change QtyOnHand to an integer.
QtyOnHand
Sorry, something went wrong.
Thank you for that. I'm sorry I needed a second set of eyes on such a simple mistake!
No branches or pull requests
The text was updated successfully, but these errors were encountered: