Language

2Checkout Documentation

Update

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 and 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"
}