public void SetProductCoupon(IProductPriceInfo product, IProductCoupon coupon) { if (product == null) { throw new ArgumentNullException(nameof(product)); } if (coupon == null) { throw new ArgumentNullException(nameof(coupon)); } var addCouponCommand = _productCouponFactory.CreateSetCouponCommand(product, coupon); _commandManager.ExecuteCommand(addCouponCommand); }
public void SetProductCoupon(IProductCoupon coupon) { Coupon = coupon; }
public SetCouponToProductCommand(IProductPriceInfo product, IProductCoupon newProductCoupon) { _product = product; _newCoupon = newProductCoupon; _previousCoupon = _product.Coupon; }
public ICommand CreateSetCouponCommand(IProductPriceInfo product, IProductCoupon newCoupon) { return(new SetCouponToProductCommand(product, newCoupon)); }