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. The Option class provides methods to create, retrieve, update and delete option and will return a JSON object.

Method

update

Use to update and existing option.

Arguments

  • dictionary Parameters

Returns

Returns the updated Option object.

Example Usage:

twocheckout.Api.credentials({'username':'APIuser1817037', 'password':'APIpass1817037'})

params = {
    'option_id': 4837092437
    }

option = twocheckout.Option.find(params)

params = {
    'option_name': 'test option'
    }

option = option.update(params)

Example Response:

{
   u'option_id': u'4837092437',
   u'option_name': u'test option',
   u'option_values': [
      {
         u'option_value_id': u'4837092440',
         u'option_value_name': u'Test',
         u'option_value_surcharge': u'1.00'
      }
   ]
}