if (!empty($bench)) { _debug($response, 'Edit expense example'); } } /******************************************** * Example; send invoice by email * , post ********************************************/ if (!empty($invoice_id)) { $response = $api->sendInvoiceEmail(array('invoice_id' => $invoice_id, 'to' => '*****@*****.**', 'cc' => array('*****@*****.**', '*****@*****.**'), 'bcc' => array('*****@*****.**'))); if (!empty($bench)) { _debug($response, 'Send email example'); } $send_invoice_post = false; if ($send_invoice_post) { $response = $api->sendInvoicePost(array('invoice_id' => $invoice_id)); if (!empty($bench)) { _debug($response, 'Send invoice post'); } } } /******************************************* * Example; update invoice item *******************************************/ $invoice_item_id = 0; // set to your item id; belongs to invoice if (!empty($invoice_id) && !empty($invoice_item_id)) { // 1) Empty client, do not update $api->setClient(array()); // 2) Set invoice id $api->setInvoice(array('id' => $invoice_id));