public void Init() { serviceClient = new ProductService5Client(); // create test Products that can be used with the create and update methods Product_in.Alias = alias; TLocalizedValue name_de = new TLocalizedValue(); name_de.LanguageCode = "de"; name_de.Value = "Test-Hauptprodukt"; TLocalizedValue name_en = new TLocalizedValue(); name_en.LanguageCode = "en"; name_en.Value = "test master product"; Product_in.Name = new TLocalizedValue[]{name_de, name_en}; Product_in.Class = "/Shops/DemoShop/ProductTypes/Shoe"; Product_in.TaxClass = "/TaxMatrixGermany/normal"; Product_in.IsVisible = true; Product_in.IsVisibleSpecified = true; Product_in.IsNew = true; Product_in.IsNewSpecified = true; Product_in.PriceQuantity = (float)1; Product_in.PriceQuantitySpecified = true; Product_in.MinOrder = (float)1; Product_in.MinOrderSpecified = true; Product_in.IntervalOrder = (float)1; Product_in.IntervalOrderSpecified = true; Product_in.OrderUnit = "/Units/piece"; Product_in.Weight = (float)240; Product_in.WeightSpecified = true; Product_in.WeightUnit = "/Units/gram"; Product_in.RefAmount = (float)1; Product_in.RefAmountSpecified = true; Product_in.RefContentAmount = (float)0.240; Product_in.RefContentAmountSpecified = true; Product_in.RefUnit = "Units/gram/kilogram"; Product_in.StockLevel = (float)140; Product_in.StockLevelSpecified = true; Product_in.StockLevelAlert = (float)100; Product_in.StockLevelAlertSpecified = true; Product_in.DeliveryPeriod = "asap"; Product_in.AvailabilityDate = new DateTime(2005, 12, 24, 10, 0, 0); TProductPrice price = new TProductPrice(); price.Price = (float)123; price.CurrencyID = "EUR"; price.TaxModel = "gross"; Product_in.ProductPrices = new TProductPrice[]{price}; Product_update.Path = path + alias; TLocalizedValue name_de_update = new TLocalizedValue(); name_de_update.LanguageCode = "de"; name_de_update.Value = "verändertes Test-Hauptprodukt"; TLocalizedValue name_en_update = new TLocalizedValue(); name_en_update.LanguageCode = "en"; name_en_update.Value = "updated test master product"; Product_update.Name = new TLocalizedValue[]{name_de_update, name_en_update}; Product_update.IsVisible = true; Product_update.IsVisibleSpecified = true; Product_update.IsNew = true; Product_update.IsNewSpecified = true; Product_update.PriceQuantity = (float)1; Product_update.PriceQuantitySpecified = true; Product_update.MinOrder = (float)1; Product_update.MinOrderSpecified = true; Product_update.IntervalOrder = (float)1; Product_update.IntervalOrderSpecified = true; Product_update.Weight = (float)240; Product_update.WeightSpecified = true; Product_update.RefAmount = (float)1; Product_update.RefAmountSpecified = true; Product_update.RefContentAmount = (float)0.240; Product_update.RefContentAmountSpecified = true; Product_update.StockLevel = (float)140; Product_update.StockLevelSpecified = true; Product_update.StockLevelAlert = (float)100; Product_update.StockLevelAlertSpecified = true; Product_update.DeliveryPeriod = "as soon as possible"; TProductPrice price_update = new TProductPrice(); price_update.Price = (float)123.50; price_update.CurrencyID = "EUR"; price_update.TaxModel = "gross"; Product_update.ProductPrices = new TProductPrice[]{price_update}; // create test Products that can be used as download product Product_down.Alias = alias; TLocalizedValue name_de_down = new TLocalizedValue(); name_de_down.LanguageCode = "de"; name_de_down.Value = "Test-Downloadprodukt"; TLocalizedValue name_en_down = new TLocalizedValue(); name_en_down.LanguageCode = "en"; name_en_down.Value = "test master product"; Product_down.Name = new TLocalizedValue[] { name_de, name_en }; Product_down.Class = "/Shops/DemoShop/ProductTypes/Shoe"; Product_down.TaxClass = "/TaxMatrixGermany/normal"; Product_down.IsAvailable = true; Product_in.IsAvailableSpecified = true; Product_down.IsDownloadProduct = true; Product_down.MaxDownloadTime = "5"; Product_down.MaxDownloadCount = "3"; TDownload download = new TDownload(); download.IsExternal = true; download.FileName = "http://www.epages.com/de/download/de-epages6-SEO.pdf"; download.Position = "10"; Product_down.DownloadProductMaps = new TDownload[] { download }; }
public void Init() { serviceClient = new ProductService5Client(); // create test Products that can be used with the create and update methods Product_in.Alias = alias; TLocalizedValue name_de = new TLocalizedValue(); name_de.LanguageCode = "de"; name_de.Value = "Test-Hauptprodukt"; TLocalizedValue name_en = new TLocalizedValue(); name_en.LanguageCode = "en"; name_en.Value = "test master product"; Product_in.Name = new TLocalizedValue[] { name_de, name_en }; Product_in.Class = "/Shops/DemoShop/ProductTypes/Shoe"; Product_in.TaxClass = "/TaxMatrixGermany/normal"; Product_in.IsVisible = true; Product_in.IsVisibleSpecified = true; Product_in.IsNew = true; Product_in.IsNewSpecified = true; Product_in.PriceQuantity = (float)1; Product_in.PriceQuantitySpecified = true; Product_in.MinOrder = (float)1; Product_in.MinOrderSpecified = true; Product_in.IntervalOrder = (float)1; Product_in.IntervalOrderSpecified = true; Product_in.OrderUnit = "/Units/piece"; Product_in.Weight = (float)240; Product_in.WeightSpecified = true; Product_in.WeightUnit = "/Units/gram"; Product_in.RefAmount = (float)1; Product_in.RefAmountSpecified = true; Product_in.RefContentAmount = (float)0.240; Product_in.RefContentAmountSpecified = true; Product_in.RefUnit = "Units/gram/kilogram"; Product_in.StockLevel = (float)140; Product_in.StockLevelSpecified = true; Product_in.StockLevelAlert = (float)100; Product_in.StockLevelAlertSpecified = true; Product_in.DeliveryPeriod = "asap"; Product_in.AvailabilityDate = new DateTime(2005, 12, 24, 10, 0, 0); TProductPrice price = new TProductPrice(); price.Price = (float)123; price.CurrencyID = "EUR"; price.TaxModel = "gross"; Product_in.ProductPrices = new TProductPrice[] { price }; Product_update.Path = path + alias; TLocalizedValue name_de_update = new TLocalizedValue(); name_de_update.LanguageCode = "de"; name_de_update.Value = "verändertes Test-Hauptprodukt"; TLocalizedValue name_en_update = new TLocalizedValue(); name_en_update.LanguageCode = "en"; name_en_update.Value = "updated test master product"; Product_update.Name = new TLocalizedValue[] { name_de_update, name_en_update }; Product_update.IsVisible = true; Product_update.IsVisibleSpecified = true; Product_update.IsNew = true; Product_update.IsNewSpecified = true; Product_update.PriceQuantity = (float)1; Product_update.PriceQuantitySpecified = true; Product_update.MinOrder = (float)1; Product_update.MinOrderSpecified = true; Product_update.IntervalOrder = (float)1; Product_update.IntervalOrderSpecified = true; Product_update.Weight = (float)240; Product_update.WeightSpecified = true; Product_update.RefAmount = (float)1; Product_update.RefAmountSpecified = true; Product_update.RefContentAmount = (float)0.240; Product_update.RefContentAmountSpecified = true; Product_update.StockLevel = (float)140; Product_update.StockLevelSpecified = true; Product_update.StockLevelAlert = (float)100; Product_update.StockLevelAlertSpecified = true; Product_update.DeliveryPeriod = "as soon as possible"; TProductPrice price_update = new TProductPrice(); price_update.Price = (float)123.50; price_update.CurrencyID = "EUR"; price_update.TaxModel = "gross"; Product_update.ProductPrices = new TProductPrice[] { price_update }; // create test Products that can be used as download product Product_down.Alias = alias; TLocalizedValue name_de_down = new TLocalizedValue(); name_de_down.LanguageCode = "de"; name_de_down.Value = "Test-Downloadprodukt"; TLocalizedValue name_en_down = new TLocalizedValue(); name_en_down.LanguageCode = "en"; name_en_down.Value = "test master product"; Product_down.Name = new TLocalizedValue[] { name_de, name_en }; Product_down.Class = "/Shops/DemoShop/ProductTypes/Shoe"; Product_down.TaxClass = "/TaxMatrixGermany/normal"; Product_down.IsAvailable = true; Product_in.IsAvailableSpecified = true; Product_down.IsDownloadProduct = true; Product_down.MaxDownloadTime = "5"; Product_down.MaxDownloadCount = "3"; TDownload download = new TDownload(); download.IsExternal = true; download.FileName = "http://www.epages.com/de/download/de-epages6-SEO.pdf"; download.Position = "10"; Product_down.DownloadProductMaps = new TDownload[] { download }; }