PHP code example of vendasta / accountgroup
1. Go to this page and download the library: Download vendasta/accountgroup 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/ */
vendasta / accountgroup example snippets
$environment = getenv("PRODUCTION_ENVIRONMENT");
if ($environment == null) {
$environment = "DEMO";
}
$client = new Vendasta\AccountGroup\V1\AccountGroupServiceClient($environment);
$createReq = new Vendasta\AccountGroup\V1\CreateAccountGroupRequest();
$location = new Vendasta\AccountGroup\V1\AccountGroupLocation();
$location->setCompanyName("<business_name>");
$location->setAddress("<address>");
$location->setCity("<city>>");
$location->setState("<state>");
$location->setCountry("<country>");
$location->setZip("<zip>");
$workNumber = array("<phone_number>");
$location->setWorkNumber($workNumber);
$createReq->setAccountGroupNap($location);
$createReq->setPartnerId("<partner_id>");
$resp = $client->Create($createReq);