Language

2Checkout Documentation

List

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

Method

list

Use to retrieve an option list.

Arguments

  • hash Parameters
    • Hash containing list_options parameters or just a option_id. Parameters -> API List Options

Returns

Returns a Option list.

Example Usage:

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

option_list = Twocheckout::Option.list()

Example Response:

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