The class can be used to set and get quota values for the services and to fetch account details.
The getAccountBalance() method fetches an array
of account id's with the current balance status (credits).
Example 782. Get account balance example
<?php
$service = new Zend_Service_DeveloperGarden_BaseUserService($config);
print_r($service->getAccountBalance());
You can fetch quota informations for a specific service module with the provided methods.
Example 783. Get quota information example
<?php
$service = new Zend_Service_DeveloperGarden_BaseUserService($config);
$result = $service->getSmsQuotaInformation(
Zend_Service_DeveloperGarden_BaseUserService::ENV_PRODUCTION
);
echo 'Sms Quota:<br />';
echo 'Max Quota: ', $result->getMaxQuota(), '<br />';
echo 'Max User Quota: ', $result->getMaxUserQuota(), '<br />';
echo 'Quota Level: ', $result->getQuotaLevel(), '<br />';
You get a result object that contains all the information
you need, optional you can pass to the QuotaInformation
method the environment constant to fetch the quota for the specific environment.
Here a list of all getQuotaInformation methods:
getConfernceCallQuotaInformation()getIPLocationQuotaInformation()getLocalSearchQuotaInformation()getSmsQuotaInformation()getVoiceCallQuotaInformation()
To change the current quota use one of the changeQuotaPool
methods. First parameter is the new pool value and the second one is the
environment.
Example 784. Change quota information example
<?php
$service = new Zend_Service_DeveloperGarden_BaseUserService($config);
$result = $service->changeSmsQuotaPool(
1000,
Zend_Service_DeveloperGarden_BaseUserService::ENV_PRODUCTION
);
if (!$result->hasError()) {
echo 'updated Quota Pool';
}
Here a list of all changeQuotaPool methods:
changeConferenceCallQuotaPool()changeIPLocationQuotaPool()changeLocalSearchQuotaPool()changeSmsQuotaPool()changeVoiceCallQuotaPool()




