Skip to main content
Vindicia Knowledge Center

Chargeback.fetchDelta

Chargeback.fetchDelta

Chargeback.fetchDelta

The fetchDelta method is similar to fetchDeltaSince, except that fetchDelta does not require a time stamp as a parameter. CashBox keeps track of when you last called this method and returns the Chargeback objects whose statuses have changed since then. If you have never called this method before, CashBox returns all your chargebacks since January 1, 1970 (“epoch”).

This method is useful for periodically fetching the chargebacks with status changes or those that are newly added to the Vindicia database if you have no facilities for recording the time window for which you retrieved the results before.

For paging, this method only requires that you specify the page size. As with fetchDeltaSince, you need not increment through page numbers because this call keeps a record of the items previously returned to you in the last call. When you make this call next time, the results will continue onward from the last position in the result set.

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.

pageSize: the number of records to display per page per call.

Output

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

chargebacks: an array of one or more Chargeback objects that are newly created or whose statuses have changed since you last called fetchDelta.

Returns

This method returns the codes listed in Standard Return Codes.

Example

$cb = new Chargeback();
$pageSize = 50;

do {

$ret = $cb->fetchDelta ($pageSize);
$count = 0;
if ($ret['returnCode'] == 200) {

$fetchedChargebacks = $ret['chargebacks'];
if ($fetchedChargebacks != null) {

$count = sizeof($fetchedChargebacks);
foreach ($fetchedChargebacks as $chargeback) {

// process a fetched chargeback here …

$status = $chargeback->getStatus();
$transactionId = $chargeback->getMerchantTransactionId();
$amount = $chargeback->getAmount();
}
$page++;

}

}

} while ($count > 0);

// quit when no more objects are retrieved

For Users

Learn More
For Users

Cashbox Features

Learn More
Cashbox Features
Back to Top