IMPORTANT This doesn't support the latest version of ZOHO api
At the time of writing, the API requests limit is 150 requests per minute per organization
$zb = new ZohoBooks('your authentication token', 'your organization id');
The above code will set the API start time
Please refer to the official Zoho Books Documentation https://www.zoho.com/books/api/v3/
==========
$contacts = $zb->allContacts();
$contact = $zb->getContact(contact_id);
These functions will return a json string if success, false in case of failure
==========
$invoices = $zb->allInvoices();
You can also set a data range
$invoices = $zb->allInvoices('2014-10-07', '2014-10-08');
$invoice = $zb->getInvoice(invoice_id);
These functions will return a json string if success, false in case of failure
$zb->postInvoice('invoice_json', true);
This function will return true if success, false in case of failure The second parameter is optional, the default value is false, if set to true will send the invoice to the customer
==========
$creditNotes = $zb->allCreditNotes();
You can also set a data range
$creditNotes = $zb->allCreditNotes('2014-10-07', '2014-10-08');
$creditNote = $zb->getCreditNote(creditNote_id);
These functions will return a json string if success, false in case of failure
$zb->postCreditNote('creditNote_json');
This function will return true if success, false in case of failure
==========
$httpCode = $zb->getHttpCode();
This function will return the response HTTP code after an API call.
==========
After each call to one of the methods above, a private method check that we haven't reached the Zoho Books limit. If we've sent 150 requests, the script is sleeped until the end of the minute from the first request.