developer:soap:methods:searchmerchants

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:soap:methods:searchmerchants [2009/07/23 23:40]
tem
developer:soap:methods:searchmerchants [2009/07/23 23:45]
tem
Line 63: Line 63:
  
 try {  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';​
  
-  $MerchantID=2;  +  $res=$client->​searchMerchants($restoken,​$search,​$matchall,​$start,​$limit,​ $sortby);
-  ​$StartDate='​2007-01-01';​  +
-  ​$EndDate='​2007-01-31'​+
  
-  $search=array( ​ 
-    array( ​ 
-      '​Field'​=>'​amount',  ​ 
-      '​Type'​=>'​eq', ​ 
-      '​Value'​=>'​4.00' ​ 
-      ),  
-    array( ​ 
-      '​Field'​=>'​created',  ​ 
-      '​Type'​=>'​gt',  ​ 
-      '​Value'​=>'​2007-03-21' ​ 
-      ),  
-    array( ​ 
-      '​Field'​=>'​created',  ​ 
-      '​Type'​=>'​lt',  ​ 
-      '​Value'​=>'​2007-03-22' ​ 
-      ),  
-    array( ​ 
-      '​Field'​=>'​response',  ​ 
-      '​Type'​=>'​eq',  ​ 
-      '​Value'​=>'​A' ​ 
-      )  
-    );  
- 
-  $res=$client->​searchMerchants($restoken,​ $MerchantID,​ $StartDate, $EndDate); ​ 
- 
-  $this->​assertEquals($res->​MerchantID,​ $MerchantID); ​ 
- 
-  $this->​assertTrue($res->​SalesCount>​1); ​ 
-                          
  
  
Line 102: Line 80:
   echo $client->​__getLastRequest(); ​   echo $client->​__getLastRequest(); ​
   echo $client->​__getLastResponse(); ​   echo $client->​__getLastResponse(); ​
-  die("getMerchant ​failed: " .$e->​getMessage()); ​+  die("searchMerchants ​failed: " .$e->​getMessage()); ​
   }    } 
  
Line 108: Line 86:
 </​code>​ </​code>​
    
- 
 ===== Change History ===== ===== Change History =====
  
Line 114: Line 91:
 |1.2 | Added Sort Parameter | |1.2 | Added Sort Parameter |
 |[[developer:​soap-1.1:​methods:​searchcustomers|1.1]] | Soap 1.1 Release | |[[developer:​soap-1.1:​methods:​searchcustomers|1.1]] | Soap 1.1 Release |
- 
  
developer/soap/methods/searchmerchants.txt · Last modified: 2009/07/23 23:45 by tem

Page Tools