-
Notifications
You must be signed in to change notification settings - Fork 17
Coupon_Update
Jacob McConnell edited this page Jun 9, 2014
·
2 revisions
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 an existing coupon.
####Arguments
- dictionary Parameters
- Dictionary containing update_coupon parameters. Parameters -> API Update Coupon
####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)
print coupon
####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
}
Please feel free to contact 2Checkout directly for assistance with your integration.