PHP code example of dobryprogramator / idoklad-api-php-client

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

    

dobryprogramator / idoklad-api-php-client example snippets




use DobryProgramator\iDoklad\Enum\Country;
use DobryProgramator\iDoklad\iDokladApiClient;
use DobryProgramator\iDoklad\UseCase\Contact\CreateContact\CreateContactRequest;

$idokladClient = new iDokladApiClient('clientId', 'clientSecret');
$createContactRequest = new CreateContactRequest('Acme Corporation', Country::CZECHIA());
$createContactRequest->setFirstname('John');
$createContactRequest->setSurname('Doe');
// All fields according to the documentation are available

$response = $idokladClient->sendRequest($createContactRequest);