developer:soap-1.4:methods:updateproductcategory

Soap API v1.4

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 ( ueSecurityToken, ProductCategoryRefNum, ProductCategory)

Arguments

Type Name Description
ueSecurityToken Token Merchant security token: used to identify merchant and retrieve the custom fields.
string ProductCategoryRefNum Product category reference number (gateway assigned)
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 PHP Soap How-to.

 

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)

.NET 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);
            }

XML

Request:

 

Response:

 

Change History

Version Change
1.3 Method added in this release
developer/soap-1.4/methods/updateproductcategory.txt · Last modified: 2010/09/07 14:11 by irina

Page Tools