コード例 #1
0
		public CartPromotionBuilder WithCoupon(Coupon coupon)
		{
			{
				_cartPromotion.CouponId = coupon.CouponId;
				_cartPromotion.Coupon = coupon;
			}

			return this;
		}
コード例 #2
0
		public CartPromotionBuilder WithCoupon(string couponCode)
		{
			{
				var coupon = new Coupon()
					{
						Code = couponCode,
						Created = DateTime.UtcNow.AddDays(-5)
					};
				_cartPromotion.CouponId = coupon.CouponId;
				_cartPromotion.Coupon = coupon;
			}

			return this;
		}