Language

2Checkout Documentation

Delete

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

Method

delete

Use to delete an existing coupon.

Arguments

  • None
    • Must be called on coupon instance.

Returns

Returns a Python object.

Example Usage:

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

params = {
    'coupon_code': 'PYTEST12'
    }
    
coupon = twocheckout.Coupon.find(params)

result = coupon.delete()

Example Response:

{
    'response_code': 'OK',
    'response_message': 'Coupon successfully deleted.'
}