-
Notifications
You must be signed in to change notification settings - Fork 12
Coupon_Create
Jacob McConnell edited this page Jun 6, 2014
·
2 revisions
The CouponService class provides methods to create, retrieve, update and delete coupons.
##Method
###Create
Use to create a coupon.
####Arguments
- TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
- CouponCreateServiceOptions Object containing create coupon attributes
####Returns
Returns a TwocheckoutResponse object.
####Example Usage:
var ServiceObject = new CouponService();
var ArgsObject = new CouponCreateServiceOptions();
ArgsObject.coupon_code = "ExampleCoupon";
ArgsObject.date_expire = "2100-01-01";
ArgsObject.value_off = (decimal)2.00;
var result = ServiceCoupon.Create(ArgsObject);####Example Response:
{TwoCheckout.TwocheckoutResponse}
response_code: "OK"
response_message: "Coupon successfully created"
coupon_code: "ExampleCoupon"Please feel free to contact 2Checkout directly for assistance with your integration.