PHP code example of voov / billingo-api-datamapper
1. Go to this page and download the library: Download voov/billingo-api-datamapper 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/ */
voov / billingo-api-datamapper example snippets
use Billingo\API\Connector\HTTP\Request;
use Billingo\API\DataMapper\BillingoFactory;
$client = new Request([
'public_key' => 'YOUR_PUBLIC_KEY',
'private_key' => 'YOUR_PRIVATE_KEY',
]);
$factory = new BillingoFactory($client);
use Billingo\API\DataMapper\Models\Clients;
$clients = $factory->make(Clients::class)->loadAll();
use Billingo\API\DataMapper\Models\Clients;
$client = $factory->make(Clients::class);
// you can either use magic variables
$client->name = 'Test Client Co.';
// or simple fill the whole model with an array
$client->fill([
'name' => 'Test Client Co.'
// ...
]);
$client->save();