This class is an instantion of the Command class, that executes a command pertaining to fetching usage information, in the default case from the database. This class should only be instantiated by dispatchMBAPI() found in include/mbapi/mbapi.php. Something similar to the following XML should be passed to dispatchMBAPI() when you want to call the GetUsage command:
<mbapi> <command><!-- None --></command> <showXMLHeader><!-- None --></showXMLHeader> <params> <usageLogID><!-- int --></usageLogID> <packageID><!-- int --></packageID> <usageLogPackageUsage><!-- float --></usageLogPackageUsage> <usageLogDateCreated><!-- int --></usageLogDateCreated> <externalID><!-- var --></externalID> <configGroupID><!-- int --></configGroupID> <bandwdithLogDateBilled><!-- int --></bandwdithLogDateBilled> <getTotals><!-- int --></getTotals> <usageLogPackageUsageGreaterThan><!-- int --></usageLogPackageUsageGreaterThan> <usageLogPackageUsageLessThan><!-- None --></usageLogPackageUsageLessThan> <usageLogPackageUsageGreatest><!-- None --></usageLogPackageUsageGreatest> <usageLogPackageUsageLeast><!-- None --></usageLogPackageUsageLeast> <usageLogDateCreatedGreaterThan><!-- int --></usageLogDateCreatedGreaterThan> <usageLogDateCreatedLessThan><!-- None --></usageLogDateCreatedLessThan> <usageLogDateCreatedGreatest><!-- None --></usageLogDateCreatedGreatest> <usageLogDateCreatedLeast><!-- None --></usageLogDateCreatedLeast> <usageLogDateBilledGreaterThan><!-- int --></usageLogDateBilledGreaterThan> <usageLogDateBilledLessThan><!-- None --></usageLogDateBilledLessThan> <usageLogDateBilledGreatest><!-- None --></usageLogDateBilledGreatest> <usageLogDateBilledLeast><!-- None --></usageLogDateBilledLeast> <sortDir><!-- None --></sortDir> <sortColumn><!-- None --></sortColumn> <recordOffset><!-- None --></recordOffset> <numRecords><!-- None --></numRecords> </params> </mbapi>
None
mbapi
command
showXMLHeader
params
usageLogID
The ID of the usage log record to fetch. This will always select at most 1 log record.
packageID
The ID of a package to fetch. This will select all records for this package.
usageLogPackageUsage
An amout to select.
usageLogDateCreated
The date of the record to select.
externalID
Whatever unique identifier is used to tie this account to an external system.
configGroupID
The id of the panel module to gather for.
bandwdithLogDateBilled
The date of invoicing to pull. Use -1 for NULL as the search criteria
getTotals
1 to send back amount used with the max allowed
usageLogPackageUsageGreaterThan
Rage bassed on the usage amount.
usageLogPackageUsageLessThan
usageLogPackageUsageGreatest
usageLogPackageUsageLeast
usageLogDateCreatedGreaterThan
Range bassed on the date created.
usageLogDateCreatedLessThan
usageLogDateCreatedGreatest
usageLogDateCreatedLeast
usageLogDateBilledGreaterThan
Rage bassed on the date billed.
usageLogDateBilledLessThan
usageLogDateBilledGreatest
usageLogDateBilledLeast
sortDir
sortColumn
recordOffset
numRecords