This class is used to retrieve package data from the database based on a variety of criteria. This data includes all information in the packages table and the ability to retrive information on the parent products of the selected packages. These getData parameters should be used with caution as they can return large sets of data is multiple packages are selected. Something similar to the following XML should be passed to dispatchMBAPI() when you want to call the GetPackages command:
<mbapi> <command><!-- None --></command> <showXMLHeader><!-- None --></showXMLHeader> <params> <packageID><!-- int --></packageID> <productID><!-- int --></productID> <productID><!-- int --></productID> <taxZoneGroupID><!-- int --></taxZoneGroupID> <clientID><!-- int --></clientID> <clientContactID><!-- int --></clientContactID> <domainID><!-- int --></domainID> <domainName><!-- string --></domainName> <invoiceID><!-- int --></invoiceID> <certID><!-- int --></certID> <cycleID><!-- int --></cycleID> <productName><!-- string --></productName> <packagePriceLessThan><!-- double --></packagePriceLessThan> <packagePrice><!-- double --></packagePrice> <packagePriceGreaterThan><!-- double --></packagePriceGreaterThan> <packageSetupFeeLessThan><!-- double --></packageSetupFeeLessThan> <packageSetupFee><!-- double --></packageSetupFee> <packageSetupFeeGreaterThan><!-- double --></packageSetupFeeGreaterThan> <packageQuantityLessThan><!-- int --></packageQuantityLessThan> <packageQuantity><!-- int --></packageQuantity> <packageQuantityGreaterThan><!-- int --></packageQuantityGreaterThan> <packageDiscountLessThan><!-- double --></packageDiscountLessThan> <packageDiscount><!-- double --></packageDiscount> <packageDiscountGreaterThan><!-- double --></packageDiscountGreaterThan> <packageStatus><!-- stringint --></packageStatus> <packageComments><!-- string --></packageComments> <packageDateBeginRenewalGreaterThan><!-- int --></packageDateBeginRenewalGreaterThan> <packageDateBeginRenewal><!-- int --></packageDateBeginRenewal> <packageDateBeginRenewalLessThan><!-- int --></packageDateBeginRenewalLessThan> <packageDateNextRenewalGreaterThan><!-- int --></packageDateNextRenewalGreaterThan> <packageDateNextRenewal><!-- int --></packageDateNextRenewal> <packageDateNextRenewalLessThan><!-- int --></packageDateNextRenewalLessThan> <packageDateLastRenewalGreaterThan><!-- int --></packageDateLastRenewalGreaterThan> <packageDateLastRenewal><!-- int --></packageDateLastRenewal> <packageDateLastRenewalLessThan><!-- int --></packageDateLastRenewalLessThan> <packageActive><!-- int --></packageActive> <packagePendingCancellation><!-- int --></packagePendingCancellation> <configGroupID><!-- int --></configGroupID> <getBillablePackagesOnly><!-- int --></getBillablePackagesOnly> <getClientData><!-- int --></getClientData> <getPackageAddonData><!-- int --></getPackageAddonData> <getPackageUsageData><!-- int --></getPackageUsageData> <getPackageDatabaseData><!-- int --></getPackageDatabaseData> <getPackagePOPAccountData><!-- int --></getPackagePOPAccountData> <getPackageProductAddonData><!-- int --></getPackageProductAddonData> <getProductData><!-- int --></getProductData> <getPackageAttributeData><!-- int --></getPackageAttributeData> <getDomainData><!-- int --></getDomainData> <getInvoiceData><!-- int --></getInvoiceData> <getCertData><!-- int --></getCertData> <getChildPackageData><!-- int --></getChildPackageData> <getFeesForPackageID><!-- int --></getFeesForPackageID> <getFeesForPackageAddonID><!-- int --></getFeesForPackageAddonID> <sortDir><!-- None --></sortDir> <sortColumn><!-- None --></sortColumn> <recordOffset><!-- None --></recordOffset> <numRecords><!-- None --></numRecords> </params> </mbapi>
None
mbapi
command
showXMLHeader
params
packageID
The ID of the package to fetch. This will always select at most 1 package.
productID
The product ID of the packages to fetch. A package is an "instantiation" of this product.
productID
The product ID of the packages to fetch. A package is an "instantiation" of this product.
taxZoneGroupID
The tax zone group ID.
clientID
The client ID of the packages to fetch.
clientContactID
The client contact ID of the packages to fetch.
domainID
The ID of the domain that is associated with the packages to fetch. This has the potential to retrieve not only domain registration packages, but hosting and SSL cert packages.
domainName
The domain that is associated with the packages to fetch. This has the potential to retrieve not only domain registration packages, but hosting and SSL cert packages.
invoiceID
The ID of the invoice that has associated packages to fetch. The association occurs through the invoice_items table.
certID
The SSL cert ID associated with the package to fetch. This will always select at most 1 package.
cycleID
The time cycle ID associated with the packages to fetch.
productName
The product name of the packages to fetch. A package is an "instantiation" of this product.
packagePriceLessThan
The maximum monetary price for a package in the result set.
packagePrice
The exact monetary price for a package in the result set.
packagePriceGreaterThan
The minimum monetary price for a package in the result set.
packageSetupFeeLessThan
The maximum monetary setup fee for a package in the result set.
packageSetupFee
The exact monetary setup fee for a package in the result set.
packageSetupFeeGreaterThan
The minimum monetary setup fee for a package in the result set.
packageQuantityLessThan
The maximum quantity for a package in the result set.
packageQuantity
The exact quantity for a package in the result set.
packageQuantityGreaterThan
The minimum quantity for a package in the result set.
packageDiscountLessThan
The maximum monetary discount for a package in the result set.
packageDiscount
The exact monetary discount for a package in the result set.
packageDiscountGreaterThan
The minimum monetary discount for a package in the result set.
packageStatus
The package status as a string or integer. A string will get converted to the correct numeric ID by the API.
packageComments
The package comments. This is selected by a LIKE statement, so does not need to be exact.
packageDateBeginRenewalGreaterThan
The minimum UNIX timestamp for when a package first renewed. This is usually the package creation date, but can be different if the pacakge was manually created. This is the "beginning of service date.
packageDateBeginRenewal
The exact UNIX timestamp for when a package first renewed. This is usually the package creation date, but can be different if the pacakge was manually created. This is the "beginning of service date.
packageDateBeginRenewalLessThan
The maximum UNIX timestamp for when a package first renewed. This is usually the package creation date, but can be different if the pacakge was manually created. This is the "beginning of service" date.
packageDateNextRenewalGreaterThan
The minimum UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.
packageDateNextRenewal
The exact UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.
packageDateNextRenewalLessThan
The maximum UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.
packageDateLastRenewalGreaterThan
The minimum UNIX timestamp for when a package was last renewed.
packageDateLastRenewal
The exact UNIX timestamp for when a package was last renewed.
packageDateLastRenewalLessThan
The maximum UNIX timestamp for when a package was last renewed.
packageActive
Set to 1 to retrieve only packages that are active.
packagePendingCancellation
Whether this package is slated to be cancelled or not. 0 = not, 1 = client cancel, 2 = admin cancel.
configGroupID
Config group (panel) to retrieve.
getBillablePackagesOnly
Set to 1 to retrieve all packages that are billable.
getClientData
Set to 1 to retrieve all client data associated with the selected packages.
getPackageAddonData
Set to 1 to retrieve all package addon data associated with the selected packages.
getPackageUsageData
Set to 1 to retrieve all usage data associated with the selected packages.
getPackageDatabaseData
Set to 1 to retrieve all database data associated with the selected packages.
getPackagePOPAccountData
Set to 1 to retrieve all POP account data associated the selected packages.
getPackageProductAddonData
Set to 1 to retrieve all product addon data associated with the selected packages' original products.
getProductData
Set to 1 to retrieve all product associated with the selected packages' original products.
getPackageAttributeData
Set to 1 to retrieve all package attributes associated with the selected packages.
getDomainData
Set to 1 to retrieve all domain data associated with the selected packages.
getInvoiceData
Set to 1 to retrieve all invoice data associated with the selected packages.
getCertData
Set to 1 to retrieve all SSL cert data associated with the selected packages.
getChildPackageData
Set to 1 to retrieve all child package data associated with the selected packages.
getFeesForPackageID
ID of the package ID to get fee packages for.
getFeesForPackageAddonID
ID of the package addon ID to get fee packages for.
sortDir
sortColumn
recordOffset
numRecords