Language

2Checkout Documentation

Update

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

Method

update

Use to update and existing option.

Arguments

  • hash Parameters

Returns

Returns updated Option object.

Example Usage:

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

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

Example Response:

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