loadBillingItemsInRange() 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 defined date range. Billing items are in effect, invoice line items

Syntax

  • AeBillingItemAry = AeXMLBridge.loadBillingItemsInRange(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 = 1;
// 0 = Wholesale, 1 = Retail

TDateRangeEnum dateRange = TDateRangeEnum.drPrevMonth;
string minDate = string.Empty;
string maxDate = string.Empty;
// not setting TDateRangeEnum to drCustom, so we set date parameters to empty

try
{
TAeBillingItem[] billingItems = ws.loadBillingItemsInRange(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 = 1
' 0 = Wholesale, 1 = Retail

Dim dateRange As TDateRangeEnum = TDateRangeEnum.drPrevMonth
' not setting TDateRangeEnum to drCustom, so we set date parameters to empty/null
Dim minDate As String = String.Empty
Dim maxDate As String = String.Empty

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

Remarks

  • If using the TDateRangeEnum value drCustom, the date parameters must be set; otherwise, set to empty/null

Possible Errors

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

loadBillingItemsExInRange
loadUsageItemsInRange

Back to Top