Skip to content

Option_Create

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

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

##Method

###Create

Use to create an option.

####Arguments

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

####Returns

Returns a TwocheckoutResponse object.

####Example Usage:

var ServiceObject = new OptionService();
var ArgsObject = new OptionCreateServiceOptions();
ArgsObject.option_name = "Test Option";
ArgsObject.option_value_name = "Test Option Value";
ArgsObject.option_value_surcharge = (decimal)2.00;

var result = ServiceObject.Create(ArgsObject);

####Example Response:

{TwoCheckout.TwoCheckoutResponse}
  response_code: "OK"
  response_message: "Option created successfully"
  option_id: "4831124727"

Clone this wiki locally