using Nop.Core; using Nop.Core.Domain.Affiliates; namespace Nop.Services.Affiliates; /// /// Affiliate service interface /// public partial interface IAffiliateService { /// /// Gets an affiliate by affiliate identifier /// /// Affiliate identifier /// /// A task that represents the asynchronous operation /// The task result contains the affiliate /// Task GetAffiliateByIdAsync(int affiliateId); /// /// Gets an affiliate by friendly URL name /// /// Friendly URL name /// /// A task that represents the asynchronous operation /// The task result contains the affiliate /// Task GetAffiliateByFriendlyUrlNameAsync(string friendlyUrlName); /// /// Marks affiliate as deleted /// /// Affiliate /// A task that represents the asynchronous operation Task DeleteAffiliateAsync(Affiliate affiliate); /// /// Gets all affiliates /// /// Friendly URL name; null to load all records /// First name; null to load all records /// Last name; null to load all records /// Value indicating whether to load affiliates only with orders placed (by affiliated customers) /// Orders created date from (UTC); null to load all records. It's used only with "loadOnlyWithOrders" parameter st to "true". /// Orders created date to (UTC); null to load all records. It's used only with "loadOnlyWithOrders" parameter st to "true". /// Page index /// Page size /// A value indicating whether to show hidden records /// /// A task that represents the asynchronous operation /// The task result contains the affiliates /// Task> GetAllAffiliatesAsync(string friendlyUrlName = null, string firstName = null, string lastName = null, bool loadOnlyWithOrders = false, DateTime? ordersCreatedFromUtc = null, DateTime? ordersCreatedToUtc = null, int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false); /// /// Inserts an affiliate /// /// Affiliate /// A task that represents the asynchronous operation Task InsertAffiliateAsync(Affiliate affiliate); /// /// Updates the affiliate /// /// Affiliate /// A task that represents the asynchronous operation Task UpdateAffiliateAsync(Affiliate affiliate); /// /// Get full name /// /// Affiliate /// /// A task that represents the asynchronous operation /// The task result contains the affiliate full name /// Task GetAffiliateFullNameAsync(Affiliate affiliate); /// /// Generate affiliate URL /// /// Affiliate /// /// A task that represents the asynchronous operation /// The task result contains the generated affiliate URL /// Task GenerateUrlAsync(Affiliate affiliate); /// /// Validate friendly URL name /// /// Affiliate /// Friendly URL name /// /// A task that represents the asynchronous operation /// The task result contains the valid friendly name /// Task ValidateFriendlyUrlNameAsync(Affiliate affiliate, string friendlyUrlName); }