PHP code example of friends-of-vertex-cards / api-client

1. Go to this page and download the library: Download friends-of-vertex-cards/api-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/ */

    

friends-of-vertex-cards / api-client example snippets


$apiKey = 'your-api-key'; // step 2. Getting API token
$factory = new \FriendsOfVertexCards\ApiClient\VertexCardsClientFactory(
            new \Http\Adapter\Guzzle7\Client(),
            new \Symfony\Component\Serializer\Serializer(),
            'https://gateway.vertex-cards.com',
            '/api/v1/cards',
            new \Psr\Log\NullLogger(),
);

$client = $factory->create(new ConfigureDto($apiKey));

$companyUuid = Ramsey\Uuid\Uuid::fromString('your-company-uuid') // step 2. Getting API token
$apiKey = 'your-api-key'; // step 2. Getting API token
/** @var \FriendsOfVertexCards\ApiClient\VertexCardsClientInterface $client */
$client = $factory->create(new ConfigureDto($apiKey)); // step 3. Client Initialization

/** @var \FriendsOfVertexCards\ApiClient\Account\List\GetListAccountResponse $accounts */
$accounts = $client->getAccounts(new \FriendsOfVertexCards\ApiClient\Account\List\GetListAccountRequest($companyUuid, 1, 10));