Example #1
0
 /// <summary>
 /// Updates a cart discount.
 /// </summary>
 /// <param name="cartDiscount">CartDiscount</param>
 /// <param name="action">The update action to be performed on the cart discount.</param>
 /// <returns>CartDiscount</returns>
 /// <see href="https://dev.commercetools.com/http-api-projects-cartDiscounts.html#update-cartdiscount"/>
 public Task <Response <CartDiscount> > UpdateCartDiscountAsync(CartDiscount cartDiscount, UpdateAction action)
 {
     return(UpdateCartDiscountAsync(cartDiscount.Id, cartDiscount.Version, new List <UpdateAction> {
         action
     }));
 }
Example #2
0
 /// <summary>
 /// Updates a cart discount.
 /// </summary>
 /// <param name="cartDiscount">CartDiscount</param>
 /// <param name="actions">The list of update actions to be performed on the cart discount.</param>
 /// <returns>CartDiscount</returns>
 /// <see href="https://dev.commercetools.com/http-api-projects-cartDiscounts.html#update-cartdiscount"/>
 public Task <Response <CartDiscount> > UpdateCartDiscountAsync(CartDiscount cartDiscount, List <UpdateAction> actions)
 {
     return(UpdateCartDiscountAsync(cartDiscount.Id, cartDiscount.Version, actions));
 }
Example #3
0
 /// <summary>
 /// Removes a CartDiscount.
 /// </summary>
 /// <param name="cartDiscount">CartDiscount</param>
 /// <returns>CartDiscount</returns>
 /// <see href="https://dev.commercetools.com/http-api-projects-cartDiscounts.html#delete-cartdiscount"/>
 public Task <Response <CartDiscount> > DeleteCartDiscountAsync(CartDiscount cartDiscount)
 {
     return(DeleteCartDiscountAsync(cartDiscount.Id, cartDiscount.Version));
 }