Search the product database, only return number of products matched
Identical to the searchProducts method except only the product counts are returned. Like searchProducts, this method returns ProductSearchResult. The only difference is that ProductSearchResult.Products 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.
ProductSearchResult searchProductsCount ( 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 (SearchParam objects) available. |
|
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 |
Sequence number to start returning on. |
integer |
Limit |
Maximum number of transactions to return in result set. |
string |
Sort |
Comma separated list of fields to sort by. |
Returns full products records for all products matching the specified search parameters. |
Dim MatchAll As Boolean
MatchAll = False
Dim searchParams(1) As eBizCharge.SearchParam
searchParams(0) = New eBizCharge.SearchParam
searchParams(0).Field = "Created"
searchParams(0).Type = "gt"
searchParams(0).Value = "2010-09-07"
Dim SearchResults As eBizCharge.ProductSearchResult = New eBizCharge.ProductSearchResult
SearchResults = client.searchProductsCount(token, searchParams, MatchAll, 0, 1000, "created")
MsgBox(SearchResults.ProductsMatched)
eBizCharge.SearchParam[] param = new eBizCharge.SearchParam[1];
param[0] = new eBizCharge.SearchParam();
param[0].Field = "Created";
param[0].Type = "Contains";
param[0].Value = "2010-08-12";
Boolean matchAll = true;
string start = "0";
string limit = "10";
string sort = "created";
eBizCharge.ProductSearchResult response = new eBizCharge.ProductSearchResult();
try
{
response = client.searchProductsCount(token, param, matchAll, start, limit, sort);
MessageBox.Show(string.Concat(response.ProductsMatched));
}
catch (Exception err)
{
MessageBox.Show(err.Message);
}