/// <summary> /// Initializes a new instance of the <see cref="ProductBase"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The sku. /// </param> /// <param name="price"> /// The price. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> internal ProductBase(string name, string sku, decimal price, CatalogInventoryCollection catalogInventoryCollection) { Mandate.ParameterNotNullOrEmpty(name, "name"); Mandate.ParameterNotNullOrEmpty(sku, "sku"); Mandate.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); _name = name; _sku = sku; _price = price; _catalogInventoryCollection = catalogInventoryCollection; }
/// <summary> /// Initializes a new instance of the <see cref="ProductVariant"/> class. /// </summary> /// <param name="productKey"> /// The product key. /// </param> /// <param name="attributes"> /// The attributes. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> internal ProductVariant( Guid productKey, ProductAttributeCollection attributes, CatalogInventoryCollection catalogInventoryCollection, string name, string sku, decimal price) : this(productKey, attributes, catalogInventoryCollection, false, name, sku, price) { }
/// <summary> /// Initializes a new instance of the <see cref="ProductBase"/> class. /// </summary> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached Contents. /// </param> internal ProductBase(string name, string sku, decimal price, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection <IProductVariantDetachedContent> detachedContents) { Ensure.ParameterNotNullOrEmpty(name, "name"); Ensure.ParameterNotNullOrEmpty(sku, "sku"); Ensure.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); Ensure.ParameterNotNull(detachedContents, "detachedContents"); _name = name; _sku = sku; _price = price; _catalogInventoryCollection = catalogInventoryCollection; _detachedContents = detachedContents; }
/// <summary> /// Initializes a new instance of the <see cref="ProductVariant"/> class. /// </summary> /// <param name="productKey"> /// The product key. /// </param> /// <param name="attributes"> /// The attributes. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="detachedContents"> /// The detached contents. /// </param> /// <param name="master"> /// The master. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> internal ProductVariant(Guid productKey, ProductAttributeCollection attributes, CatalogInventoryCollection catalogInventoryCollection, DetachedContentCollection <IProductVariantDetachedContent> detachedContents, bool master, string name, string sku, decimal price) : base(name, sku, price, catalogInventoryCollection, detachedContents) { Mandate.ParameterNotNull(attributes, "attributes"); Mandate.ParameterNotNull(catalogInventoryCollection, "warehouseInventory"); _productKey = productKey; _attibutes = attributes; _master = master; }
/// <summary> /// Initializes a new instance of the <see cref="ProductVariant"/> class. /// </summary> /// <param name="productKey"> /// The product key. /// </param> /// <param name="attributes"> /// The attributes. /// </param> /// <param name="catalogInventoryCollection"> /// The catalog inventory collection. /// </param> /// <param name="master"> /// The master. /// </param> /// <param name="name"> /// The name. /// </param> /// <param name="sku"> /// The SKU. /// </param> /// <param name="price"> /// The price. /// </param> internal ProductVariant(Guid productKey, ProductAttributeCollection attributes, CatalogInventoryCollection catalogInventoryCollection, bool master, string name, string sku, decimal price) : this(productKey, attributes, catalogInventoryCollection, new DetachedContentCollection <IProductVariantDetachedContent>(), false, name, sku, price) { }