Language

2Checkout Documentation

Update

The CouponService class provides methods to create, retrieve, update and delete coupons.

Method

Update

Use to update and existing coupon.

Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.
  • CouponUpdateServiceOptions - Object composed of update coupon attributes.

Returns

Returns a TwoCheckoutResponse object.

Example Usage:

var ServiceObject = new CouponService();
var ArgsObject = new CouponCreateServiceOptions();
ArgsObject.coupon_code = time;
ArgsObject.date_expire = "2099-12-22";
ArgsObject.type = "shipping";

var result = ServiceObject.Create(ArgsObject);

Example Response:

{TwoCheckout.TwoCheckoutResponse}
  response_code: "OK"
  response_message: "Coupon updated successfully"
  coupon_code: "DOTNETSHIPPING"