Skip to content

Option_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 option.

####Arguments

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

####Returns

Returns a TwocheckoutResponse object.

####Example Usage:

ProductOption option = TwocheckoutOption.retrieve(option_id);
option.setOptionName("test");
TwocheckoutResponse result = option.update();

####Example Response (toJson):

{
   "response_code" : "OK",
   "response_message" : "Option updated successfully"
}

Clone this wiki locally