Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

IManufacturerService.cs

using Nop.Core;
using Nop.Core.Domain.Catalog;
using Nop.Core.Domain.Customers;
using Nop.Core.Domain.Discounts;

namespace Nop.Services.Catalog;

/// 
/// Manufacturer service
/// 
public partial interface IManufacturerService
{
    /// 
    /// Clean up manufacturer references for a specified discount
    /// 
    /// Discount
    /// A task that represents the asynchronous operation
    Task ClearDiscountManufacturerMappingAsync(Discount discount);

    /// 
    /// Deletes a discount-manufacturer mapping record
    /// 
    /// Discount-manufacturer mapping
    /// A task that represents the asynchronous operation
    Task DeleteDiscountManufacturerMappingAsync(DiscountManufacturerMapping discountManufacturerMapping);

    /// 
    /// Deletes a manufacturer
    /// 
    /// Manufacturer
    /// A task that represents the asynchronous operation
    Task DeleteManufacturerAsync(Manufacturer manufacturer);

    /// 
    /// Delete manufacturers
    /// 
    /// Manufacturers
    /// A task that represents the asynchronous operation
    Task DeleteManufacturersAsync(IList manufacturers);

    /// 
    /// Gets all manufacturers
    /// 
    /// Manufacturer name
    /// Store identifier; 0 if you want to get all records
    /// Page index
    /// Page size
    /// A value indicating whether to show hidden records
    /// 
    /// null - process "Published" property according to "showHidden" parameter
    /// true - load only "Published" products
    /// false - load only "Unpublished" products
    /// 
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturers
    /// 
    Task> GetAllManufacturersAsync(string manufacturerName = "",
        int storeId = 0,
        int pageIndex = 0,
        int pageSize = int.MaxValue,
        bool showHidden = false,
        bool? overridePublished = null);

    /// 
    /// Get manufacturer identifiers to which a discount is applied
    /// 
    /// Discount
    /// Customer
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturer identifiers
    /// 
    Task> GetAppliedManufacturerIdsAsync(Discount discount, Customer customer);

    /// 
    /// Gets a manufacturer
    /// 
    /// Manufacturer identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturer
    /// 
    Task GetManufacturerByIdAsync(int manufacturerId);

    /// 
    /// Gets the manufacturers by category identifier
    /// 
    /// Category identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturers
    /// 
    Task> GetManufacturersByCategoryIdAsync(int categoryId);

    /// 
    /// Gets manufacturers by identifier
    /// 
    /// manufacturer identifiers
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturers
    /// 
    Task> GetManufacturersByIdsAsync(int[] manufacturerIds);

    /// 
    /// Get manufacturers for which a discount is applied
    /// 
    /// Discount identifier; pass null to load all records
    /// A value indicating whether to load deleted manufacturers
    /// Page index
    /// Page size
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the list of manufacturers
    /// 
    Task> GetManufacturersWithAppliedDiscountAsync(int? discountId = null,
        bool showHidden = false, int pageIndex = 0, int pageSize = int.MaxValue);

    /// 
    /// Inserts a manufacturer
    /// 
    /// Manufacturer
    /// A task that represents the asynchronous operation
    Task InsertManufacturerAsync(Manufacturer manufacturer);

    /// 
    /// Updates the manufacturer
    /// 
    /// Manufacturer
    /// A task that represents the asynchronous operation
    Task UpdateManufacturerAsync(Manufacturer manufacturer);

    /// 
    /// Deletes a product manufacturer mapping
    /// 
    /// Product manufacturer mapping
    /// A task that represents the asynchronous operation
    Task DeleteProductManufacturerAsync(ProductManufacturer productManufacturer);

    /// 
    /// Gets product manufacturer collection
    /// 
    /// Manufacturer identifier
    /// Page index
    /// Page size
    /// A value indicating whether to show hidden records
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product manufacturer collection
    /// 
    Task> GetProductManufacturersByManufacturerIdAsync(int manufacturerId,
        int pageIndex = 0, int pageSize = int.MaxValue, bool showHidden = false);

    /// 
    /// Gets a product manufacturer mapping collection
    /// 
    /// Product identifier
    /// A value indicating whether to show hidden records
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product manufacturer mapping collection
    /// 
    Task> GetProductManufacturersByProductIdAsync(int productId, bool showHidden = false);

    /// 
    /// Gets a product manufacturer mapping 
    /// 
    /// Product manufacturer mapping identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the product manufacturer mapping
    /// 
    Task GetProductManufacturerByIdAsync(int productManufacturerId);

    /// 
    /// Inserts a product manufacturer mapping
    /// 
    /// Product manufacturer mapping
    /// A task that represents the asynchronous operation
    Task InsertProductManufacturerAsync(ProductManufacturer productManufacturer);

    /// 
    /// Updates the product manufacturer mapping
    /// 
    /// Product manufacturer mapping
    /// A task that represents the asynchronous operation
    Task UpdateProductManufacturerAsync(ProductManufacturer productManufacturer);

    /// 
    /// Get manufacturer IDs for products
    /// 
    /// Products IDs
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the manufacturer IDs for products
    /// 
    Task> GetProductManufacturerIdsAsync(int[] productIds);

    /// 
    /// Returns a list of names of not existing manufacturers
    /// 
    /// The names and/or IDs of the manufacturers to check
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the list of names and/or IDs not existing manufacturers
    /// 
    Task GetNotExistingManufacturersAsync(string[] manufacturerIdsNames);

    /// 
    /// Returns a ProductManufacturer that has the specified values
    /// 
    /// Source
    /// Product identifier
    /// Manufacturer identifier
    /// A ProductManufacturer that has the specified values; otherwise null
    ProductManufacturer FindProductManufacturer(IList source, int productId, int manufacturerId);

    /// 
    /// Get a discount-manufacturer mapping record
    /// 
    /// Manufacturer identifier
    /// Discount identifier
    /// 
    /// A task that represents the asynchronous operation
    /// The task result contains the result
    /// 
    Task GetDiscountAppliedToManufacturerAsync(int manufacturerId, int discountId);

    /// 
    /// Inserts a discount-manufacturer mapping record
    /// 
    /// Discount-manufacturer mapping
    /// A task that represents the asynchronous operation
    Task InsertDiscountManufacturerMappingAsync(DiscountManufacturerMapping discountManufacturerMapping);
}