developer:soap-1.6:methods:getproductcategories

Differences

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

Link to this comparison view

developer:soap-1.6:methods:getproductcategories [2012/08/04 11:19] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​
  
 +====== getProductCategories ======
 +
 +Retrieve all product categories
 +
 +===== Description =====
 +
 +This method retrieves an array of [[..:​objects:​ProductCategory]] objects for all product categories.  ​
 +
 +See also [[addProductCategory]]
 +
 +===== Syntax =====
 +
 +[[..:​objects:​ProductCategory]][] **getProductCategories** ( [[..:​objects:​ueSecurityToken]] Token)
 +
 +===== Arguments =====
 +
 +^Type   ​^Name ​  ​^Description ​  ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.|
 +
 +===== Return Value =====
 +
 +|[[..:​objects:​ProductCategory]][] |Returns an array of [[..:​objects:​ProductCategory]] objects containing information on the product categories |
 +
 +===== Exceptions =====
 +
 +The following exceptions (errors) are applicable to this method. ​
 +
 +^Code ^Message ​ ^Advice ​ ^
 +
 +===== Examples =====
 +
 +
 +==== PHP ====
 +
 +For directions on how to set up the WSDL link, create "​$token"​ and "​$client",​ go to [[..:​howto:​php|PHP Soap How-to]].
 +
 +<code php>
 +<?​php ​
 +
 +?>
 +</​code>​
 +
 +==== VB ====
 +
 +<code vb>
 +        Dim category() As usaepay.ProductCategory
 +        category = client.getProductCategories(token)
 +
 +        MsgBox(category.Length)
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +            try
 +            {
 +                usaepay.ProductCategory[] category = client.getProductCategories(token);​
 +                MessageBox.Show(string.Concat(category.Length));​
 +            }
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +            }
 +</​code>​
 +
 +
 +==== XML ====
 +Request:
 +<code xml>
 +<?xml version="​1.0"​ encoding="​UTF-8"?>​
 +<​SOAP-ENV:​Envelope xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/" ​
 +xmlns:​ns1="​urn:​usaepay"​ 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:​getProductCategories>​
 +<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>​
 + </​ns1:​getProductCategories>​
 +</​SOAP-ENV:​Body>​
 +</​SOAP-ENV:​Envelope>​
 +</​code>​
 +
 +Response:
 +<code xml>
 +<?xml version="​1.0"​ encoding="​utf-8"?>​
 +<​SOAP-ENV:​Envelope ​
 +xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/" ​
 +xmlns:​ns1="​urn:​usaepay" ​
 +xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/" ​
 +xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema" ​
 +xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​
 +  <​SOAP-ENV:​Body>​
 +    <​ns1:​getProductCategoriesResponse>​
 +      <​getProductCategoriesReturn SOAP-ENC:​arrayType="​ns1:​ProductCategory[4]"​ xsi:​type="​ns1:​ProductCategoryArray">​
 +        <item xsi:​type="​ns1:​ProductCategory">​
 +          <​ProductCategoryRefNum xsi:​type="​xsd:​string">​900100191</​ProductCategoryRefNum>​
 +          <Name xsi:​type="​xsd:​string">​Books:​Math</​Name>​
 +        </​item>​
 +        <item xsi:​type="​ns1:​ProductCategory">​
 +          <​ProductCategoryRefNum xsi:​type="​xsd:​string">​900100193</​ProductCategoryRefNum>​
 +          <Name xsi:​type="​xsd:​string">​Example Category</​Name>​
 +        </​item>​
 +        <item xsi:​type="​ns1:​ProductCategory">​
 +          <​ProductCategoryRefNum xsi:​type="​xsd:​string">​900100194</​ProductCategoryRefNum>​
 +          <Name xsi:​type="​xsd:​string">​Example Category</​Name>​
 +        </​item>​
 +        <item xsi:​type="​ns1:​ProductCategory">​
 +          <​ProductCategoryRefNum xsi:​type="​xsd:​string">​900100192</​ProductCategoryRefNum>​
 +          <Name xsi:​type="​xsd:​string">​Test Category</​Name>​
 +        </​item>​
 +      </​getProductCategoriesReturn>​
 +    </​ns1:​getProductCategoriesResponse>​
 +  </​SOAP-ENV:​Body>​
 +</​SOAP-ENV:​Envelope>​
 +</​code>​
 +
 +
 +===== Change History =====
 +
 +^Version ^Change ^
 +|[[developer:​soap-1.3:​methods:​getproductcategories|1.3]] | Method added in this release |
developer/soap-1.6/methods/getproductcategories.txt ยท Last modified: 2012/08/04 11:19 by tem

Page Tools