This repository has been archived by the owner on Jun 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
GetInvoices()
hitmanpt edited this page Feb 9, 2017
·
1 revision
Through this explanation we assume that you have using WHMCS_API;
on the begining of the file
And the API()
class initialized as _api
If needed check the Getting Started page
Prototype: GetInvoices.GetInvoices GetInvoices(int LimitStart = 0, int LimitNumber = 25, int UserID = -1, string Status = "")
Input:
- LimitStart: The offset for the returned invoice data (optional [default: 0])
- LimitNumber: The number of records to return (optional [default: 25])
- UserID: Find invoices for a specific client id (optional)
- Status: Find invoices for a specific status. Standard Invoice statuses plus Overdue (optional)
Output: GetInvoices Model
To call it just use GetInvoices.GetInvoices gi = _api.GetInvoices();
This way we get the first 25 invoices generated by the WHMCS platform
The GetTransactions model is inside it's own namespace (more info)
View all details about GetInvoices Model
https://developers.whmcs.com/api-reference/getinvoices/
using WHMCS_API;
namespace YourApp
{
class YourClass
{
public void YourFunction()
{
API _api = new API("username", "password", "accesskey", "url");
GetInvoices.GetInvoices gi = _api.GetInvoices();
foreach(GetInvoices.Invoice i in gi.Invoices.Invoice)
{
Console.WriteLine("The User: {0} has the invoice id {1} with status {2}", i.Firstname, i.ID, i.Status);
}
}
}
}
PCDev Open Source Development Team 2017