Search previously settled batches, return only counts
Identical to the searchBatches method except only the batch counts are returned. Like searchBatches, this method returns BatchSearchResult. The only difference is that BatchSearchResult.Batches is left empty. This method provides a quicker way to determine the size of the result set before starting to retrieve the full search results.
BatchSearchResult searchBatchesCount ( ueSecurityToken Token, SearchParam Search, boolean MatchAll, integer Start, integer Limit, string Sort)
Type |
Name |
Description |
Token |
Merchant security token: used to identify merchant and validate transaction. |
|
Search |
Array of search parameters |
|
boolean |
MatchAll |
If set to “true,” only results matching all search criteria will be returned, if set to “false,” results matching any of the search criteria will be returned. |
integer |
Start |
Index to start returning batches from. |
integer |
Limit |
Max number of batches to return in result set. |
string |
Sort |
Field name to sort the results by |
Returns the result of the batch search based on the search parameters set. |
<?php
try {
// make sure you have prepared data to search on
$search=array(
'Field'=>'closed',
'Type'=>'gt',
'Value'=>'2007-04-01'),
);
$start=0;
$limit=100;
$matchall=true;
$sort='closed';
$res=$client->searchBatchesCount($token,$search,$matchall,$start,$limit,$sort);
print_r($res);
}
catch (SoapFault $e) {
echo $client->__getLastRequest();
echo $client->__getLastResponse();
die("Search batches failed failed :" .$e->getMessage());
}
?>
try {
SearchParamArray searchParams = new SearchParamArray();
searchParams.add(new SearchParam("Sequence","eq", "123456"));
BigInteger start = new BigInteger("0");
BigInteger limit = new BigInteger("9999999");
BatchSearchResult BatchResult = new BatchSearchResult();
BatchResult = client.searchBatchesCount(token, searchParams, true, start, limit, "Sequence");
System.out.println(BatchResult.getBatchesMatched());
} catch (Exception e) {
System.out.println("Soap Exception: " + e.getMessage());
}
Dim client As eBizCharge.eBizChargeService = New eBizCharge.eBizChargeService
Dim token As eBizCharge.ueSecurityToken
token = Me.CreateToken("O79erw1433ZBIE0O4Pv25aVDnw3qDVc8", "1234")
Dim matchAll As Boolean
matchAll = True
Dim start As String
Dim limit As String
Dim sort As String
start = "0"
limit = "10"
sort = "closed"
Dim search(0 To 1) As eBizCharge.SearchParam
search(0) = New eBizCharge.SearchParam
search(0).Field = "closed"
search(0).Type = "gt"
search(0).Value = "2010-08-05"
Dim result As eBizCharge.BatchSearchResult = New eBizCharge.BatchSearchResult
result = client.searchBatchesCount(token, search, matchAll, start, limit, sort)
MsgBox(result.BatchesMatched)
Boolean matchAll;
matchAll = true;
string start = "0";
string limit = "10";
string sort = "closed";
string[] fields = new string[3];
eBizCharge.SearchParam[] search = new eBizCharge.SearchParam[2];
search[0] = new eBizCharge.SearchParam();
search[0].Field = "Closed";
search[0].Type = "gt";
search[0].Value = "2010-08-05";
eBizCharge.BatchSearchResult result = new eBizCharge.BatchSearchResult();
try
{
result = client.searchBatchesCount(token, search, matchAll, start, limit, sort);
MessageBox.Show(string.Concat(result.BatchesMatched));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="urn:eBizCharge" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns1:searchBatchesCount>
<Token xsi:type="ns1:ueSecurityToken">
<ClientIP xsi:type="xsd:string">192.168.0.1</ClientIP>
<PinHash xsi:type="ns1:ueHash">
<HashValue xsi:type="xsd:string">11ac55b0a0b59f8f028dbf85bc32266fa973dd0e</HashValue>
<Seed xsi:type="xsd:string">12678150211876663375</Seed>
<Type xsi:type="xsd:string">sha1</Type>
</PinHash>
<SourceKey xsi:type="xsd:string">HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey>
</Token>
<Search SOAP-ENC:arrayType="ns1:SearchParam[1]" xsi:type="ns1:SearchParamArray">
<item xsi:type="ns1:SearchParam">
<Field xsi:type="xsd:string">closed</Field>
<Type xsi:type="xsd:string">gt</Type>
<Value xsi:type="xsd:string">2007-04-01</Value>
</item>
</Search>
<MatchAll xsi:type="xsd:boolean">true</MatchAll>
<Start xsi:type="xsd:integer">0</Start>
<Limit xsi:type="xsd:integer">5</Limit>
<Sort xsi:type="xsd:string">closed</Sort>
</ns1:searchBatchesCount>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>