using Nop.Core.Domain.Discounts; using Nop.Web.Framework.Models; namespace Nop.Web.Framework.Factories; /// /// Represents the discount supported model factory /// public partial interface IDiscountSupportedModelFactory { /// /// Prepare selected and all available discounts for the passed model /// /// Discount supported model type /// Model /// List of all available discounts /// A task that represents the asynchronous operation Task PrepareModelDiscountsAsync(TModel model, IList availableDiscounts) where TModel : IDiscountSupportedModel; /// /// Prepare selected and all available discounts for the passed model by entity applied discounts /// /// Discount supported model type /// Discount supported entity type /// Model /// Entity /// List of all available discounts /// Whether to ignore existing applied discounts /// A task that represents the asynchronous operation Task PrepareModelDiscountsAsync(TModel model, IDiscountSupported entity, IList availableDiscounts, bool ignoreAppliedDiscounts) where TModel : IDiscountSupportedModel where TMapping : DiscountMapping; }