-
Notifications
You must be signed in to change notification settings - Fork 16
Coupon_Update
Jacob McConnell edited this page Jun 10, 2014
·
2 revisions
You must specify your API username and password using the Twocheckout.apiusername & Twocheckout.apipassword class variables before calling a method in this class.
##Method
###update
Use to update and existing coupon.
####Arguments
- None
- Updates by passing your coupon object's properties. Parameters -> API Update Coupon
####Returns
Returns a TwocheckoutResponse object.
####Example Usage:
Coupon coupon = TwocheckoutCoupon.retrieve(coupon_code);
coupon.setDateExpire("2020-01-01")
TwocheckoutResponse result = coupon.update();####Example Response (toJson):
{
"coupon_code" : "javalibrarytest",
"response_code" : "OK",
"response_message" : "Coupon updated successfully"
}Please feel free to contact 2Checkout directly for assistance with your integration.