Language

2Checkout Documentation

Find

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

Methods

find

Use to retrieve a coupon.

Arguments

Returns

Returns a Coupon object.

Example Usage:

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

coupon = Twocheckout::Coupon.find(:coupon_code => '7EBHKS2')

Example Response:

#{
    "coupon_code"=>"7EBHKS2",
    "date_expire"=>"2099-12-10",
    "minimum_purchase"=>"1.00",
    "percentage_off"=>nil,
    "product"=>[
        {
            "product_id"=>nil,
            "product_url"=>"https://www.2checkout.com/api/products/detail_product?product_id="
        }
    ],
    "type"=>"shipping",
    "value_off"=>nil
}