Search and retrieve companies

use Emis\Http\Client;
use Emis\Company\Api\Proxy\Search;
use Emis\Company\Api\Proxy\Companies;

$client = new Client();

//Search for a company named 'ABB Bulgaria EOOD' in Bulgaria by using the "Search" class and filters.
$search = new Search($client);
$filter = array();
$filter[] = "country:BG";
$filter[] = "name:ABB Bulgaria EOOD";
$result = $search->queryCompany($filter);

//Get the isic code of the first company in the result.
$isic = $result->getResultList()[0]->getIsic();

//Get extended information for the company by using the "Companies" class.
$companies = new Companies($client);
$company = $companies->getFullCompany($isic);