GetPackages

Description

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:

Attributes

package
modernbill
subpackage
mbapi
version
0.1
author
Vic Fryzel
author
Andy Christ

Example Request

	<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>

		

Example Response

None
		

Request Elements

mbapi
Type
None
Description
None
Children
command
Type
None
Description
None
showXMLHeader
Type
None
Description
None
params
Type
None
Description
None
Children
packageID
Type
int
Description

The ID of the package to fetch. This will always select at most 1 package.

productID
Type
int
Description

The product ID of the packages to fetch. A package is an "instantiation" of this product.

productID
Type
int
Description

The product ID of the packages to fetch. A package is an "instantiation" of this product.

taxZoneGroupID
Type
int
Description

The tax zone group ID.

clientID
Type
int
Description

The client ID of the packages to fetch.

clientContactID
Type
int
Description

The client contact ID of the packages to fetch.

domainID
Type
int
Description

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
Type
string
Description

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
Type
int
Description

The ID of the invoice that has associated packages to fetch. The association occurs through the invoice_items table.

certID
Type
int
Description

The SSL cert ID associated with the package to fetch. This will always select at most 1 package.

cycleID
Type
int
Description

The time cycle ID associated with the packages to fetch.

productName
Type
string
Description

The product name of the packages to fetch. A package is an "instantiation" of this product.

packagePriceLessThan
Type
double
Description

The maximum monetary price for a package in the result set.

packagePrice
Type
double
Description

The exact monetary price for a package in the result set.

packagePriceGreaterThan
Type
double
Description

The minimum monetary price for a package in the result set.

packageSetupFeeLessThan
Type
double
Description

The maximum monetary setup fee for a package in the result set.

packageSetupFee
Type
double
Description

The exact monetary setup fee for a package in the result set.

packageSetupFeeGreaterThan
Type
double
Description

The minimum monetary setup fee for a package in the result set.

packageQuantityLessThan
Type
int
Description

The maximum quantity for a package in the result set.

packageQuantity
Type
int
Description

The exact quantity for a package in the result set.

packageQuantityGreaterThan
Type
int
Description

The minimum quantity for a package in the result set.

packageDiscountLessThan
Type
double
Description

The maximum monetary discount for a package in the result set.

packageDiscount
Type
double
Description

The exact monetary discount for a package in the result set.

packageDiscountGreaterThan
Type
double
Description

The minimum monetary discount for a package in the result set.

packageStatus
Type
stringint
Description

The package status as a string or integer. A string will get converted to the correct numeric ID by the API.

packageComments
Type
string
Description

The package comments. This is selected by a LIKE statement, so does not need to be exact.

packageDateBeginRenewalGreaterThan
Type
int
Description

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
Type
int
Description

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
Type
int
Description

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
Type
int
Description

The minimum UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.

packageDateNextRenewal
Type
int
Description

The exact UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.

packageDateNextRenewalLessThan
Type
int
Description

The maximum UNIX timestamp for when a package will next renew. This is the date that invoicing is based off of.

packageDateLastRenewalGreaterThan
Type
int
Description

The minimum UNIX timestamp for when a package was last renewed.

packageDateLastRenewal
Type
int
Description

The exact UNIX timestamp for when a package was last renewed.

packageDateLastRenewalLessThan
Type
int
Description

The maximum UNIX timestamp for when a package was last renewed.

packageActive
Type
int
Description

Set to 1 to retrieve only packages that are active.

packagePendingCancellation
Type
int
Description

Whether this package is slated to be cancelled or not. 0 = not, 1 = client cancel, 2 = admin cancel.

configGroupID
Type
int
Description

Config group (panel) to retrieve.

getBillablePackagesOnly
Type
int
Description

Set to 1 to retrieve all packages that are billable.

getClientData
Type
int
Description

Set to 1 to retrieve all client data associated with the selected packages.

getPackageAddonData
Type
int
Description

Set to 1 to retrieve all package addon data associated with the selected packages.

getPackageUsageData
Type
int
Description

Set to 1 to retrieve all usage data associated with the selected packages.

getPackageDatabaseData
Type
int
Description

Set to 1 to retrieve all database data associated with the selected packages.

getPackagePOPAccountData
Type
int
Description

Set to 1 to retrieve all POP account data associated the selected packages.

getPackageProductAddonData
Type
int
Description

Set to 1 to retrieve all product addon data associated with the selected packages' original products.

getProductData
Type
int
Description

Set to 1 to retrieve all product associated with the selected packages' original products.

getPackageAttributeData
Type
int
Description

Set to 1 to retrieve all package attributes associated with the selected packages.

getDomainData
Type
int
Description

Set to 1 to retrieve all domain data associated with the selected packages.

getInvoiceData
Type
int
Description

Set to 1 to retrieve all invoice data associated with the selected packages.

getCertData
Type
int
Description

Set to 1 to retrieve all SSL cert data associated with the selected packages.

getChildPackageData
Type
int
Description

Set to 1 to retrieve all child package data associated with the selected packages.

getFeesForPackageID
Type
int
Description

ID of the package ID to get fee packages for.

getFeesForPackageAddonID
Type
int
Description

ID of the package addon ID to get fee packages for.

sortDir
Type
None
Description
None
sortColumn
Type
None
Description
None
recordOffset
Type
None
Description
None
numRecords
Type
None
Description
None

Response Elements

None