loadBillingItemsExInRange() Method

Table of Contents

  1. Function
  2. Syntax
  3. Parameters
  4. Return Value
  5. Sample Code
  6. Remarks
  7. Possible Errors
  8. Related Methods

Function

  • Returns an array of billing items within a defined date range. Billing items are in effect, invoice line items.

Syntax

  • TAeBillingItemExAry = AeXMLBridge.loadBillingItemsExInRange(ItemType, DateRangeEnum, MinDate, MaxDate);

Parameters

  • Integer - item type
  • Enumeration - TDateRangeEnum
  • String - begin date (yyyy-mm-dd format)
  • String - end date (yyyy-mm-dd format)

Return Value

Sample Code

C#

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17

int itemType = 0;
// 0 = Wholesale, 1 = Retail

TDateRangeEnum dateRange = TDateRangeEnum.drCustom;
// when using TDateRangeEnum.drCustom, date parameters need to be set
string minDate = DateTime.Now.AddDays(-90).ToString("yyyy-MM-dd");
string maxDate = DateTime.Now.ToString("yyyy-MM-dd");

try
{
TAeBillingItemEx[] billingItems = ws.loadBillingItemsExInRange(itemType, dateRange, minDate, maxDate);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

VB.Net

1
2
3
4
5
6
7
8
9
10
11
12
13
14

Dim itemType As Integer = 0
' 0 = Wholesale, 1 = Retail

Dim dateRange As TDateRangeEnum = TDateRangeEnum.drCustom
Dim minDate As String = DateTime.Now.AddDays(-90).ToString("yyyy-MM-dd")
' when using TDateRangeEnum.drCustom, date parameters need to be set
Dim maxDate As String = DateTime.Now.ToString("yyyy-MM-dd")

Try
Dim billingItems As TAeBillingItemEx() = ws.loadBillingItemsExInRange(itemType, dateRange, minDate, maxDate)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try

Remarks

  • If using the TDateRangeEnum value of drCustom, the date parameters must be set and in the yyyy-mm-dd format. Otherwise, set the date parameters to empty/null

Possible Errors

  • yyyy-mm-dd is required [Date supplied in invalid format] (drCustom only)

loadBillingItemsInRange
loadUsageItemsInRange

Back to Top