PHP code example of koren-software / erplybooks-api-php-client
1. Go to this page and download the library: Download koren-software/erplybooks-api-php-client library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
koren-software / erplybooks-api-php-client example snippets
$token = ''; // Set your API token
$client = new Koren\ErplyBooks\Client($token);
$response = $client->Invoices()->get(); // Koren\ErplyBooks\Response\ItemsResponse
$response = $client->Invoices()->get(1); // Koren\ErplyBooks\Response\ItemResponse
$invoices = $client->Invoices()->get(); // Koren\ErplyBooks\Response\ItemsResponse
// Items response is iterable
foreach ($invoices as $invoice) {
// Do something with $invoice
}
// Responses are jsonable
$json = json_decode($response); // json string of all items or item
// Responses are countable
$count = count($response); // integer (how many items were in response)