GetInvoices

Description

This class is an instantion of the Command class, that executes a command pertaining to fetching invoice 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 GetPackages command:

Attributes

package
modernbill
subpackage
mbapi
version
0.1
author
Michael Fountain
author
Andy Christ

Example Request

	<mbapi>
		<command><!-- None --></command>
		<showXMLHeader><!-- None --></showXMLHeader>
		<params>
			<invoiceID><!-- int --></invoiceID>
			<invoiceNumber><!-- string --></invoiceNumber>
			<packageID><!-- int --></packageID>
			<clientID><!-- int --></clientID>
			<domainID><!-- int --></domainID>
			<certID><!-- int --></certID>
			<productID><!-- int --></productID>
			<taxZoneID><!-- int --></taxZoneID>
			<invoiceAmount><!-- double --></invoiceAmount>
			<invoiceAmountLessThan><!-- double --></invoiceAmountLessThan>
			<invoiceAmountGreaterThan><!-- double --></invoiceAmountGreaterThan>
			<invoiceAmountPaid><!-- double --></invoiceAmountPaid>
			<invoiceAmountPaidLessThan><!-- double --></invoiceAmountPaidLessThan>
			<invoiceAmountPaidGreaterThan><!-- double --></invoiceAmountPaidGreaterThan>
			<invoiceDateEntered><!-- int --></invoiceDateEntered>
			<invoiceDateEnteredLessThan><!-- int --></invoiceDateEnteredLessThan>
			<invoiceDateEnteredGreaterThan><!-- int --></invoiceDateEnteredGreaterThan>
			<invoiceDateDue><!-- int --></invoiceDateDue>
			<invoiceDateDueLessThan><!-- int --></invoiceDateDueLessThan>
			<invoiceDateDueGreaterThan><!-- int --></invoiceDateDueGreaterThan>
			<invoiceDatePaid><!-- int --></invoiceDatePaid>
			<invoiceDatePaidLessThan><!-- int --></invoiceDatePaidLessThan>
			<invoiceDatePaidGreaterThan><!-- int --></invoiceDatePaidGreaterThan>
			<invoicePaymentMethod><!-- int --></invoicePaymentMethod>
			<invoiceComments><!-- string --></invoiceComments>
			<invoiceSubTotal><!-- None --></invoiceSubTotal>
			<invoiceSubTotalLessThan><!-- None --></invoiceSubTotalLessThan>
			<invoiceSubTotalGreaterThan><!-- None --></invoiceSubTotalGreaterThan>
			<invoiceDiscount><!-- None --></invoiceDiscount>
			<invoiceDiscountLessThan><!-- None --></invoiceDiscountLessThan>
			<invoiceDiscountGreaterThan><!-- None --></invoiceDiscountGreaterThan>
			<invoiceTax><!-- None --></invoiceTax>
			<invoiceTaxLessThan><!-- None --></invoiceTaxLessThan>
			<invoiceTaxGreaterThan><!-- None --></invoiceTaxGreaterThan>
			<invoiceStatus><!-- None --></invoiceStatus>
			<paymentGroupID><!-- None --></paymentGroupID>
			<getDueInvoicesOnly><!-- int --></getDueInvoicesOnly>
			<getPaidInovicesOnly><!-- int --></getPaidInovicesOnly>
			<getInvoiceLineItemsData><!-- None --></getInvoiceLineItemsData>
			<getInvoiceLineItemsPaymentsData><!-- None --></getInvoiceLineItemsPaymentsData>
			<getTaxZonesData><!-- None --></getTaxZonesData>
			<getProductData><!-- None --></getProductData>
			<getTransactionData><!-- None --></getTransactionData>
			<getSubscriptionData><!-- None --></getSubscriptionData>
			<clientStatus><!-- None --></clientStatus>
			<getInvoiceStats><!-- int --></getInvoiceStats>
			<mergeContactData><!-- int --></mergeContactData>
			<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
invoiceID
Type
int
Description

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

invoiceNumber
Type
string
Description

The invoice number, can contain string characters.

packageID
Type
int
Description

The ID of the package to fetch. This will always select invoices generated for this package.

clientID
Type
int
Description

The ID of the client to fetch invoices for

domainID
Type
int
Description

The ID of the domain to fetch. This will always select invoices generated for this domain.

certID
Type
int
Description

The ID of the cert to fetch. This will always select invoices generated for this cert.

productID
Type
int
Description

The ID of the product to fetch. This will always select invoices generated for this product.

taxZoneID
Type
int
Description

The ID of the tax zone to fetch. This will always select invoices generated for this tax zone.

invoiceAmount
Type
double
Description

The amount of the invoice to fetch. This will always select invoices generated for this amount.

invoiceAmountLessThan
Type
double
Description

The greatest amount of the invoice to fetch. This will always select invoices less than the greatest amount.

invoiceAmountGreaterThan
Type
double
Description

The least amount of the invoice to fetch. This will always select invoices greater than the least amount.

invoiceAmountPaid
Type
double
Description

The amount paid of the invoice to fetch. This will always select invoices with the exact amount paid.

invoiceAmountPaidLessThan
Type
double
Description

The greatest amount paid of the invoice to fetch. This will always select invoices less than the greatest amount paid.

invoiceAmountPaidGreaterThan
Type
double
Description

The least amount paid of the invoice to fetch. This will always select invoices greater than the least amount paid.

invoiceDateEntered
Type
int
Description

The date created unix timestamp of the invoice to fetch. This will always select invoices with the exact date created unix timestamp.

invoiceDateEnteredLessThan
Type
int
Description

The greatest date created unix timestamp of the invoice to fetch. This will always select invoices less than the greatest date created unix timestamp.

invoiceDateEnteredGreaterThan
Type
int
Description

The least date created unix timestamp of the invoice to fetch. This will always select invoices greater than the least date created unix timestamp.

invoiceDateDue
Type
int
Description

The date due unix timestamp of the invoice to fetch. This will always select invoices with the exact date due unix timestamp.

invoiceDateDueLessThan
Type
int
Description

The greatest date due unix timestamp of the invoice to fetch. This will always select invoices less than the greatest date due unix timestamp.

invoiceDateDueGreaterThan
Type
int
Description

The least date due unix timestamp of the invoice to fetch. This will always select invoices greater than the least date due unix timestamp.

invoiceDatePaid
Type
int
Description

The date paid unix timestamp of the invoice to fetch. This will always select invoices with the exact date paid unix timestamp.

invoiceDatePaidLessThan
Type
int
Description

The greatest date paid unix timestamp of the invoice to fetch. This will always select invoices less than the greatest date paid unix timestamp.

invoiceDatePaidGreaterThan
Type
int
Description

The least date paid unix timestamp of the invoice to fetch. This will always select invoices greater than the least date paid unix timestamp.

invoicePaymentMethod
Type
int
Description

The ID of the payment method of the invoice to fetch. This will always select invoices with the same payment methods.

invoiceComments
Type
string
Description

A string in the involice comments of the invoice to fetch. This will always select invoices with a like string in the comments.

invoiceSubTotal
Type
None
Description
None
invoiceSubTotalLessThan
Type
None
Description
None
invoiceSubTotalGreaterThan
Type
None
Description
None
invoiceDiscount
Type
None
Description
None
invoiceDiscountLessThan
Type
None
Description
None
invoiceDiscountGreaterThan
Type
None
Description
None
invoiceTax
Type
None
Description
None
invoiceTaxLessThan
Type
None
Description
None
invoiceTaxGreaterThan
Type
None
Description
None
invoiceStatus
Type
None
Description
None
paymentGroupID
Type
None
Description
None
getDueInvoicesOnly
Type
int
Description

Set to 1 to return only invoices that are due in full or partial.

getPaidInovicesOnly
Type
int
Description

Set to 1 to return only invoices that are paid in full.

getInvoiceLineItemsData
Type
None
Description
None
getInvoiceLineItemsPaymentsData
Type
None
Description
None
getTaxZonesData
Type
None
Description
None
getProductData
Type
None
Description
None
getTransactionData
Type
None
Description
None
getSubscriptionData
Type
None
Description
None
clientStatus
Type
None
Description
None
getInvoiceStats
Type
int
Description

Set to 1 obtain a count of invoices grouped by status. Useful for overview pages.

mergeContactData
Type
int
Description

Set to 1 merge the company data to each invoice in the response.

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

Response Elements

None