PHP code example of ec / cns-client

1. Go to this page and download the library: Download ec/cns-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/ */

    

ec / cns-client example snippets





apiInstance = new EC\CNS\Client\Api\ClientSystemsApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$client_system_key = 'client_system_key_example'; // string | The unique client system key identifier.
$client_system_password = 'client_system_password_example'; // string | Client System Password.
$white_list_request = new \EC\CNS\Client\Model\WhiteListRequest(); // \EC\CNS\Client\Model\WhiteListRequest | Smtp addresses list for a Client System.

try {
    $result = $apiInstance->addWhiteList($client_system_key, $client_system_password, $white_list_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling ClientSystemsApi->addWhiteList: ', $e->getMessage(), PHP_EOL;
}