Skip to main content
Vindicia Knowledge Center

RatePlan.fetchEvents

RatePlan.fetchEvents

RatePlan.fetchEvents

The fetchEvents method returns all Events for the specified Account, AutoBill, Product, or RatePlan.

If no input parameters are specified, this call will return the first 50 of all Events in your CashBox system. (Default pageSize is 50.)

Input

srd: sparse response description, a SOAP string (which must be a JSON object), in which you specify the elements you want returned.This parameter enables the calling system to constrain a method call to return only components you specify. This gives you greater control over returned content, and improves response time within the Vindicia platform by reducing the processing needed for the call.

Some fields are required, either practically or in the WSDL, and will be returned regardless of the srd. A null srd returns the complete response.

account: the Account for which Events should be fetched.

autobill: the AutoBill for which Events should be fetched.

product: the Product for which Events should be fetched.

ratePlan: the RatePlan for which Events should be fetched. (Optional.)

startTimestamp: the starting time stamp (lower limit) for the range of Events you wish to retrieve.

endTimestamp: the ending time stamp (upper limit) for the range of Events you wish to retrieve.

page: (optional) the page number, starting at 0, for which to return the results. For example, if the total number of results is 85 and pageSize is 10:

  • Specifying 0 for page gets the results from 1 through 10.
  • Specifying 2 for page gets the results from 21 through 30.

pageSize: (optional) the number of records to display per page per call. This value must be greater than 0.

Output

return: an object of type Return that indicates the success or failure of the call.

event: an array of Event objects that match the input constraints.

Returns

This method returns the codes listed in Standard Return Codes.

Example

// For a specific product on a specific AutoBill
// fetch all Events on all RatePlans
// within a specific date range.

$rateplan = new RatePlan;
$response = $rateplan->fetchEvents(

null, # account
$myAutoBill, #
$myProduct, #
null, # ratePlan
'2012-03-01', # start
'2012-03-31', # end
0, # page
50, # pageSize

);
if ($response['returnCode'] == 200) {

$events = $response->['data']->event;
foreach ($events as $ev) {

print $ev->amount;
print $ev->description;
print $ev->eventDate;
print $ev->billedStatus;
print $ev->VID;

}

}

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top