You must specify your API username and password using the Twocheckout::API.credentials method before calling a method in this class.
Use to retrieve a list of all active coupons or only those matching a variety of coupon attributes.
Returns a Coupon list.
Twocheckout::API.credentials = { :username => 'APIuser1817037', :password => 'APIpass1817037' } coupons = Twocheckout::Coupon.list()
{ "coupon" : [ { "coupon_code" : "COUPON", "date_expire" : "3000-02-25", "minimum_purchase" : "1.00", "percentage_off" : "0.10", "type" : "product", "value_off" : null }, { "coupon_code" : "FREESHIPPING", "date_expire" : "2013-04-13", "minimum_purchase" : "0.00", "percentage_off" : null, "type" : "shipping", "value_off" : null }, { "coupon_code" : "SAVEJUNE", "date_expire" : "2013-03-31", "minimum_purchase" : "2999.99", "percentage_off" : null, "type" : "product", "value_off" : "100.00" } ], "response_code" : "OK", "response_message" : "Coupon information retrieved successfully." }