Language

2Checkout Documentation

Create

You must specify your API username and password using the Twocheckout::API.credentials method before calling a method in this class.

Method

create

Use to create an option.

Arguments

  • hash Parameters

Returns

Returns an Option object.

Example Usage:

Twocheckout::API.credentials = { :username => 'APIuser1817037', :password => 'APIpass1817037' }

new_option = Twocheckout::Option.create({:option_name => "test option", :option_value_name => "test option value", :option_value_surcharge => 1.00})

Example Response:

#{
    "option_id"=>"4839039618",
    "option_name"=>"test option",
    "option_values"=>[
        {
            "option_value_id"=>"4839039621",
            "option_value_name"=>"test option value",
            "option_value_surcharge"=>"1.00"
        }
    ]
}