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.

Method

update

Use to update and existing coupon.

Arguments

  • dictionary Parameters

Returns

Returns the updated Coupon object.

Example Usage:

find_params = {
    'coupon_code': 'PYTEST12'
    }

coupon = twocheckout.Coupon.find(find_params)

update_params = {
    'date_expire': '2020-01-01'
    }

coupon = coupon.update(update_params)

Example Response:

{
    u'coupon_code': u'PYTEST12',
    u'date_expire': u'2020-01-01',
    u'minimum_purchase': u'0.00',
    u'percentage_off': None,
    u'product': [
        {
            u'product_id': None,
            u'product_url': u'https://www.2checkout.com/api/products/detail_product?product_id='
        }
    ],
    u'type': u'shipping',
    u'value_off': None
}