PHP code example of nxsys / library.clients-brex

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

    

nxsys / library.clients-brex example snippets



#if using composer use the autoloader


$oSDK=new BrexSdk\SDKHost;

//Let's get company details to start
$oTeamClient=$oSDK->setAuthKey('BREX TOKEN') #consider using a token vault
	->setupTeamClient();

/** @var BrexSdk\API\Team\Client */
$oTeamClient;

//... OR
//if you will be doing work across the API, use the follow convenience method
$oTeamClient=$oSDK->setupAllClients()->getTeamClient();
//etc...

/** @var BrexSdk\API\Team\Model\CompanyResponse */
$aCompanyDetails=$oTeamClient->getCompany();

$sCompanyName=$aCompanyDetails->getLegalName();
// ACME Corp, Inc.