developer:soap-1.6:methods:updateproductcategory

Differences

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

Link to this comparison view

developer:soap-1.6:methods:updateproductcategory [2012/08/04 11:20] (current)
tem created
Line 1: Line 1:
 +<embed ..:​contents/>​
 +
 +====== updateProductCategory ======
 +
 +This method updates an existing product category. ​
 +
 +===== Description =====
 +
 +Updates an existing product category based on its ProductCategoryRefNum. ​ The entire product category is replaced by the contents of the Product category parameter. ​ Developers can use the getProductCategory method to retrieve the Product category object, ​ modify a field and then post the object back to the server. ​
 +
 +See also 
 +
 +===== Syntax =====
 +
 +boolean **updateProductCategory** ( [[..:​objects:​ueSecurityToken]],​ ProductCategoryRefNum,​ [[..:​objects:​ProductCategory]])
 +
 +===== Arguments =====
 +
 +^Type   ​^Name ​  ​^Description ​  ^
 +|[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.|
 +|string |ProductCategoryRefNum |Product category reference number (gateway assigned) |
 +|[[..:​objects:​ProductCategory]] |Product Category |Product category data|
 +
 +===== Return Value =====
 +
 +|boolean |Returns a true if the product category is updated correctly |
 +
 +===== Exceptions =====
 +
 +The following exceptions (errors) are applicable to this method. ​
 +
 +^Code ^Message ​ ^Advice ​ ^
 +|41007 |Error saving product categry ​ |Product Category specified by ProductCategoryRefNum was not found. ​ Make sure the number stored is not truncated or rounded. |
 +
 +===== 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>
 +
 +</​code>​
 +
 +==== VB ====
 +
 +<code vb>
 +Dim catRefNum As String
 +        catRefNum = "​9001169811"​
 +
 +        Dim category As usaepay.ProductCategory = New usaepay.ProductCategory
 +        category.Name = "third try"
 +        Dim response As Boolean
 +
 +        response = client.updateProductCategory(token,​ catRefNum, category)
 +        MsgBox(response)
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +            string catRefNum = "​900116983";​
 +
 +            usaepay.ProductCategory category = new usaepay.ProductCategory();​
 +            category.Name = "next try";
 +            Boolean response;
 +
 +            try
 +            {
 +                response = client.updateProductCategory(token,​ catRefNum, category);
 +                MessageBox.Show(string.Concat(response));​
 +            }
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +            }
 +</​code>​
 +
 +==== XML ====
 +Request:
 +<code xml>
 +
 +
 +</​code>​
 +
 +Response:
 +<code xml>
 +
 +</​code>​
 +
 +
 +===== Change History =====
 +
 +^Version ^Change ^
 +|[[developer:​soap-1.3:​methods:​updateproductcategory|1.3]] | Method added in this release |
  
developer/soap-1.6/methods/updateproductcategory.txt ยท Last modified: 2012/08/04 11:20 by tem

Page Tools