developer:soap-1.3:methods:searchproductscustom

Differences

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

Link to this comparison view

Next revision
Previous revision
developer:soap-1.3:methods:searchproductscustom [2010/06/01 16:36]
tem created
developer:soap-1.3:methods:searchproductscustom [2010/10/12 16:51]
irina
Line 141: Line 141:
 ==== VB ==== ==== VB ====
 <code vb> <code vb>
-  ​Dim client ​As usaepay.usaepayService ​= New usaepay.usaepayService + Dim search(0 To 1) As usaepay.SearchParam 
-  Dim token As usaepay.ueSecurityToken+        search(0) ​= New usaepay.SearchParam()
  
-  token = Me.CreateToken("982lz9VsLm87MA54Sv8E582h8OZMArL6""443311")+        search(0).Field = "Created" 
 +        search(0).Type = "gt" 
 +        search(0).Value = "​2010-09-07"​
  
-  ​Dim MatchAll ​As Boolean+        ​Dim matchAll ​As Boolean 
 +        matchAll = True 
 +        Dim start As String 
 +        start = "​0"​ 
 +        Dim limit As String 
 +        limit = "​10"​
  
-  MatchAll ​False+        Dim FieldList(0 To 2) As String 
 +         
 +        FieldList(0) ​"​ProductRefNum"​ 
 +        FieldList(1) = "​Name"​ 
 +        FieldList(2) = "​Price"​
  
-  ​Dim searchParams(1) ​As usaepay.SearchParam +        ​Dim format ​As String 
-    ​searchParams(0) = New usaepay.SearchParam +        ​format ​= "csv
-    searchParams(0).Field ​= "Created+        Dim sort As String 
-    ​searchParams(0).Type = "​eq"​ +        ​sort ​= "created" 
-    ​searchParams(0).Value ​= "2009-02-19"+        Dim result As String
  
-  Dim SearchResults As usaepay.TransactionSearchResult = New usaepay.TransactionSearchResult +        result ​= client.searchProductsCustom(token, ​searchmatchAllstartlimitFieldList, format, sort) 
-  SearchResults ​= client.searchTransactions(token, ​searchParamsMatchAll01000"​created"​)+        Dim binaryData() As Byte 
 +        binaryData = Convert.FromBase64String(result)
  
-  ​MsgBox(SearchResults.TransactionsMatched)+        ​MsgBox(Encoding.UTF8.GetString(binaryData))
 </​code>​ </​code>​
  
 +==== .NET C# ====
 +<code c>
 +usaepay.SearchParam[] search = new usaepay.SearchParam[1];​
 +            search[0] = new usaepay.SearchParam();​
  
 +            search[0].Field = "​Created";​
 +            search[0].Type = "​Contains";​
 +            search[0].Value = "​2010-09-01";​
 +
 +            Boolean matchAll = true;
 +            string start = "​0";​
 +            string limit = "​10";​
 +
 +            string[] FieldList = new string[3];
 +            FieldList[0] = "​ProductRefNum";​
 +            FieldList[1] = "​Name";​
 +            FieldList[2] = "​Price";​
 +
 +            string format = "​csv";​
 +            string sort = "​created";​
 +
 +            string result;
 +
 +            try
 +            {
 +                result = client.searchProductsCustom(token,​ search, matchAll, start, limit, FieldList, format, sort);
 +                Byte[] binaryData = new Byte[3];
 +                binaryData = Convert.FromBase64String(result);​
 +
 +                MessageBox.Show(Encoding.UTF8.GetString(binaryData));​
 +
 +            }
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +            }
 +</​code>​
  
 ==== Coldfusion ==== ==== Coldfusion ====
developer/soap-1.3/methods/searchproductscustom.txt · Last modified: 2010/10/12 16:51 by irina

Page Tools