Skip to content

Coupon_List

Jacob McConnell edited this page Jun 6, 2014 · 2 revisions

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

###List

Use to retrieve a list of all active coupons or only those matching a variety of coupon attributes.

####Arguments

  • TwoCheckoutConfig - Set your ApiUsername and ApiPassword.

####Returns

Returns a CouponList object.

####Example Usage:

var ServiceObject = new CouponService();
var result = ServiceObject.List();

####Example Response:

{TwoCheckout.CouponList}
  coupon: ...
    {TwoCheckout.Coupon}
      coupon_code: "7EBHJFP"
      date_expire: 12/10/2099
      minimum_purchase: 1.00
      percentage_off: null
      type: "shipping"
      value_off: null
    {TwoCheckout.Coupon}
      coupon_code: "7EBHKS2"
      date_expire: 12/10/2099
      minimum_purchase: 1.00
      percentage_off: null
      type: "shipping"
      value_off: null
    {TwoCheckout.Coupon}
      coupon_code: "7EBHKVT"
      date_expire: 12/10/2099
      minimum_purchase: 1.00
      percentage_off: null
      type: "shipping"
      value_off: null
Clone this wiki locally