developer:soap-1.6:methods:deleteproductcategory

Differences

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

Link to this comparison view

developer:soap-1.6:methods:deleteproductcategory [2012/08/04 11:21]
tem created
developer:soap-1.6:methods:deleteproductcategory [2013/04/05 13:21] (current)
kat
Line 1: Line 1:
 <embed ..:​contents/>​ <embed ..:​contents/>​
  
-====== ​updateProductCategory ​======+====== ​deleteProductCategory ​======
  
-This method ​updates ​an existing product category. ​+This method ​deletes ​an existing product category. ​
  
 ===== Description ===== ===== 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. ​+This method removes the specified ProductCategoryRefNum from the product ​database.  The product category is deleted immediately and this operation can not be undone. The ProductCategoryRefNum is the gateway assigned product Category ID that was returned ​by [[.:​addProductCategory]].  ​
  
-See also  
  
-===== Syntax =====+See also [[addProductCategory]]
  
-boolean **updateProductCategory** ( [[..:​objects:​ueSecurityToken]],​ ProductCategoryRefNum, [[..:​objects:​ProductCategory]])+===== Syntax ===== 
 +boolean **deleteProductCategory** ( [[..:​objects:​ueSecurityToken]] ​Tokenstring ​ProductCategoryRefNum)
  
 ===== Arguments ===== ===== Arguments =====
Line 19: Line 19:
 ^Type   ​^Name ​  ​^Description ​  ^ ^Type   ​^Name ​  ​^Description ​  ^
 |[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.| |[[..:​objects:​ueSecurityToken]] |Token |Merchant security token: used to identify merchant and retrieve the custom fields.|
-|string |ProductCategoryRefNum |Product category reference number ​(gateway assigned) | +|string |ProductCategoryRefNum |Product category reference number ​used to delete a product ​category|
-|[[..:​objects:​ProductCategory]] |Product Category |Product ​category ​data|+
  
 ===== Return Value ===== ===== Return Value =====
  
-|boolean |Returns ​true if the product category is updated correctly ​|+|boolean |Returns true if product category ​has been deleted (on error an exception ​is thrown) ​|
  
 ===== Exceptions ===== ===== Exceptions =====
Line 31: Line 30:
  
 ^Code ^Message ​ ^Advice ​ ^ ^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. |+|41008 |Failed to delete ​product ​category ​ ​|Product ​category ​specified by ProductCategoryRefNum was not found. ​ Make sure the number stored is not truncated or rounded. |
  
 ===== Examples ===== ===== Examples =====
Line 41: Line 40:
  
 <code php> <code php>
- 
 </​code>​ </​code>​
  
Line 47: Line 45:
  
 <code vb> <code vb>
-Dim catRefNum As String+        ​Dim catRefNum As String
         catRefNum = "​9001169811"​         catRefNum = "​9001169811"​
- 
-        Dim category As usaepay.ProductCategory = New usaepay.ProductCategory 
-        category.Name = "third try" 
         Dim response As Boolean         Dim response As Boolean
  
-        response = client.updateProductCategory(token, catRefNum, category+        response = client.deleteProductCategory(token, catRefNum) 
-        MsgBox(response)+        MsgBox(response) ​
 </​code>​ </​code>​
  
Line 62: Line 57:
             string catRefNum = "​900116983";​             string catRefNum = "​900116983";​
  
-            usaepay.ProductCategory category = new usaepay.ProductCategory();​ 
-            category.Name = "next try"; 
             Boolean response;             Boolean response;
  
             try             try
             {             {
-                response = client.updateProductCategory(token, catRefNum, category);+                response = client.deleteProductCategory(token, catRefNum);
                 MessageBox.Show(string.Concat(response));​                 MessageBox.Show(string.Concat(response));​
             }             }
Line 80: Line 73:
 Request: Request:
 <code xml> <code xml>
- 
- 
 </​code>​ </​code>​
  
 Response: Response:
 <code xml> <code xml>
- 
 </​code>​ </​code>​
  
Line 93: Line 83:
  
 ^Version ^Change ^ ^Version ^Change ^
-|[[developer:​soap-1.3:​methods:​deleteproductcategory|1.3]] ​| Method added in this release | +|1.3 | Method added in this release |
developer/soap-1.6/methods/deleteproductcategory.txt · Last modified: 2013/04/05 13:21 by kat

Page Tools