Exemplo n.º 1
0
 /// <summary>
 /// Update a Coupon
 /// </summary>
 /// <param name="couponId">The identifier of Coupon</param>
 /// <param name="newData">Coupon object to be updated</param>
 /// <returns>The new updated coupon</returns>
 public async Task<Coupon> Update(int couponId, Coupon newData)
 {
     var endPoint = String.Format("coupons/{0}", couponId);
     var bundle = new CouponBundle { Content = newData };
     return (await Put(endPoint, toSerialize: bundle)).Content;
 }
Exemplo n.º 2
0
 // Update A Coupon
 public Coupon Update(int couponId, Coupon newData)
 {
     return Put(apiEndpoint: String.Format("coupons/{0}", couponId), toSerialize: new CouponBundle { Content = newData }).Content;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Create a Coupon
 /// </summary>
 /// <param name="orderData"></param>
 /// <returns></returns>
 public async Task<Coupon> Create(Coupon orderData)
 {
     var bundle = new CouponBundle { Content = orderData };
     return (await Post(apiEndpoint: "coupons", toSerialize: bundle)).Content;
 }
Exemplo n.º 4
0
 // Create A Coupon
 public Coupon Create(Coupon orderData)
 {
     return Post(apiEndpoint: "coupons", toSerialize: new CouponBundle { Content = orderData }).Content;
 }