Skip to content

Product_Update

Jacob McConnell edited this page Jun 10, 2014 · 2 revisions

You must specify your API username and password using the Twocheckout.apiusername & Twocheckout.apipassword class variables before calling a method in this class.

##Method

###update

Use to update an existing product.

####Arguments

  • None
  • Updates by passing your product object's properties. Parameters -> API Update Product

####Returns

Returns a TwocheckoutResponse object.

####Example Usage:

Product product = TwocheckoutProduct.retrieve(product_id);
product.setName("test");
TwocheckoutResponse result = product.update();

####Example Response (toJson):

{
   "assigned_product_id" : "19",
   "product_id" : "4774376165",
   "response_code" : "OK",
   "response_message" : "Product successfully updated"
}

Clone this wiki locally