Skip to content

Option_Update

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

The OptionService class provides methods to create, retrieve, update and delete options.

##Method

###Update

Use to update an existing option.

####Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
  • OptionCreateServiceOptions Object containing update option attributes

####Returns

Returns a TwocheckoutResponse object.

####Example Usage:

var ServiceObject = new OptionService();
var ArgsObject = new OptionUpdateServiceOptions();
ArgsObject.option_id = option_id;
ArgsObject.option_name = "Test Option 123";
ArgsObject.option_value_name = "Test Option Value 123";
ArgsObject.option_value_surcharge = (decimal)1.00;

var result = ServiceObject.Update(ArgsObject);

####Example Response:

{TwoCheckout.TwoCheckoutResponse}
  response_code: "OK"
  response_message: "Option updated successfully"

Clone this wiki locally