developer:soap-1.2:methods:searchmerchantscount

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developer:soap-1.2:methods:searchmerchantscount [2010/02/12 11:39] (current)
hmcgowan created
Line 1: Line 1:
 +<embed ..:​contents/>​
 +
 +====== searchMerchantsCount ======
 +
 +**Reseller only method.**
 +
 +Search active merchants.
 +
 +===== Description =====
 +
 +Identical to the [[searchMerchants]] method except only the merchants counts are returned. ​ Like [[searchMerchants]], ​ this method returns [[..:​objects:​MerchantSearchResult]]. ​ The only difference is that MerchantSearchResult.Merchants 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.
 +
 +See also [[searchMerchants]],​ [[searchMerchantsCustom]]
 +
 +===== Syntax =====
 +
 +[[..:​objects:​MerchantSearchResult]] **searchMerchantsCount** ( [[..:​objects:​ueSecurityToken]] Token, [[..:​objects:​SearchParam]] Search, boolean MatchAll, integer Start, integer Limit, string Sort) 
 +
 +
 +===== Arguments =====
 +
 +^Type   ​^Name ​   ^Description ​    ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Reseller security token, used to identify reseller and validate request.|
 +|[[..:​objects:​SearchParam]] |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 |Start position, defaults to 0 (first merchant found).|
 +|integer |Limit |Maximum number of merchants to return in result. |
 +|string |Sort |Field name to sort the results by |
 +
 +
 +
 +===== Return Value =====
 +
 +|[[..:​objects:​MerchantSearchResult]] |Returns results of active merchant search based on search parameters set.  |
 +
 +===== Examples =====
 +
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$restoken"​ and "​$client",​ go to [[developer:​soap:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +try { 
 +  $search=array(
 +    array('​Field'​=>'​State',​ '​Type'​=>'​eq','​Value'​=>'​CA'​),​
 +    array('​Field'​=>'​Contact',​ '​Type'​=>'​eq',​ '​Value'​=>'​John Doe'),
 +    array('​Field'​=>'​Company',​ '​Type'​=>'​eq',​ '​Value'​=>'​DidorightInc.'​)
 +  );
 +  $start=0;
 +  $limit=100;
 +  $matchall=true;​
 +  $sortby='​merchid';​
 +
 +  $res=$client->​searchMerchantsCount($restoken,​$search,​$matchall,​$start,​$limit,​ $sortby);
 +  print_r($res);​
 +
 +
 +catch (SoapFault $e) { 
 +  echo $client->​__getLastRequest(); ​
 +  echo $client->​__getLastResponse(); ​
 +  die("​searchMerchants failed: " .$e->​getMessage()); ​
 +
 +
 +?> 
 +</​code>​
 + 
 +===== Change History =====
 +
 +^Version ^Change ^
 +|1.2 | Method added in soap 1.2 release |
  
developer/soap-1.2/methods/searchmerchantscount.txt ยท Last modified: 2010/02/12 11:39 by hmcgowan

Page Tools