-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
The example code for invoices is straight forward for single line invoices. But since lines
is a js object and you can't have duplicate keys I don't see a clear way to create an invoice with multiple lines. Could you shed some light on this?
var Freshbooks = require('freshbooks-node');
var freshbooks = new Freshbooks(APPLICATION_NAME, APPLICATION_TOKEN, USER_AGENT)
freshbooks.call('invoice.create',
{
invoice:
{ client_id: 32,
status: 'draft',
lines: {
line:
{
name: 'Tulips',
description: 'A type of flower',
unit_cost: 10,
quantity: 2
}
}
}
}, function(err, json) {
if (err) {
console.error(err);
}
console.log(JSON.stringify(json, null, 4));
});
Metadata
Metadata
Assignees
Labels
No labels