Example #1
0
 public GiftVoucher(string code,
                    string name,
                    decimal value,
                    VoucherSpecification voucherSpecification,
                    VoucherApplyStrategy voucherApplyStrategy)
     : base(VoucherType.Gift, code, name, value, voucherSpecification, voucherApplyStrategy)
 {
 }
Example #2
0
 public Voucher(VoucherType voucherType,
                string code,
                string name,
                decimal value,
                VoucherSpecification voucherSpecification,
                VoucherApplyStrategy applyStrategy)
 {
     VoucherType          = voucherType;
     Code                 = code;
     Name                 = name;
     Value                = value;
     VoucherSpecification = voucherSpecification;
     ApplyStrategy        = applyStrategy;
 }
Example #3
0
 public bool CanBeAppliedToCart(ShoppingCart shoppingCart) => VoucherSpecification.VoucherCanBeApplied(shoppingCart);