-
Notifications
You must be signed in to change notification settings - Fork 69
Coupon_Update
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
The Twocheckout_Coupon class provides methods to create, retrieve, update and delete options and will return an Array or JSON response depending on your format specification.
##Method
###update
Use to update an existing coupon.
####Arguments
- array Array
- Array containing update_coupon parameters in key => value pairs. Parameters -> API Update Coupon
####Returns
Returns an Array or JSON depending on your format specification.
####Example Usage:
Twocheckout::username('APIuser1817037');
Twocheckout::password('APIpass1817037');
$args = array(
'coupon_code' => 'ABCD123',
'new_code' => '123ABCD',
'type' => 'sale'
);
$result = Twocheckout_Coupon::update($args);
####Example Response:
Array
(
[response_code] => OK
[response_message] => Coupon updated successfully
)
Please feel free to contact 2Checkout directly for assistance with your integration.