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

Type Description
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 category 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
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);
                }

Change History

Version Change
1.3 Method added in this release