public void _002_TestCouponCreate()
 {
     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);
     coupon_code = result.coupon_code;
     Assert.IsInstanceOf<TwoCheckoutResponse>(result);
 }
Esempio n. 2
0
        public TwoCheckoutResponse Create(CouponCreateServiceOptions options)
        {
            String Result = TwoCheckoutUtil.Request("api/products/create_coupon", "POST", "admin", options);

            return(TwoCheckoutUtil.MapToObject <TwoCheckoutResponse>(Result));
        }