PHP code example of inserve / copaco-cloud-api-php
1. Go to this page and download the library: Download inserve/copaco-cloud-api-php 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/ */
inserve / copaco-cloud-api-php example snippets
use GuzzleHttp\Client;
use Inserve\CopacoCloudAPI\CopacoCloudAPIClient;
$apiClient = new CopacoCloudAPIClient(
client: $guzzleClient,
);
$apiClient->setBearerToken('...');
// Retrieve customers
$customers = $apiClient->getCustomers([
'pageSize' => 30,
'customerStatus' => 'Active',
]);
// Retrieve subscriptions
$subscriptions = $apiClient->getSubscriptions([
'customerId' => '123-456-789',
'