private static ProductBasic[] getProds() { setProxy(); var authentication1 = new com.n11.api.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz com.n11.api.GetProductListRequest ProductListRequest = new com.n11.api.GetProductListRequest(); ProductListRequest.auth = authentication1; com.n11.api.ProductServicePortService port = new ProductServicePortService(); com.n11.api.GetProductListResponse response = port.GetProductList(ProductListRequest); var products = response.products; return products; }
private void button1_Click_1(object sender, EventArgs e) { var authentication1 = new com.n11.api.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz ProductServicePortService prodServ = new ProductServicePortService(); SaveProductRequest saveRequest = new SaveProductRequest(); //marka, tarih aralığı saveRequest.auth = authentication1; saveRequest.product = new ProductRequest(); saveRequest.product.productSellerCode = txtMagazaKodu.Text; saveRequest.product.title = txtUrunBasligi.Text; saveRequest.product.subtitle = txtaltBaslik.Text; saveRequest.product.description = richTextBox1.Text; saveRequest.product.category = new CategoryRequest(); saveRequest.product.category.id = Convert.ToInt32(txtUrunKategoriNo.Text); saveRequest.product.price = Convert.ToDecimal(txtFiyati.Text); saveRequest.product.currencyType = comboBox1.Text; ProductImage prImg = new ProductImage(); ProductImage[] pr = new ProductImage[1]; pr[0] = prImg; string resimUrl = urunResimlericmbBox.Text.Replace("https", "http"); prImg.url = resimUrl; prImg.order = "1"; saveRequest.product.images = pr; saveRequest.product.productCondition = txtUrunDurumu.Text; saveRequest.product.preparingDay = txtprodPrepDay.Text; saveRequest.product.shipmentTemplate = txtKargoSablonu.Text; ProductSkuRequest prStock = new ProductSkuRequest(); prStock.quantity = txtStokMiktari.Text; prStock.optionPrice = Convert.ToDecimal(txtFiyati.Text); ProductSkuRequest[] prStockList = new ProductSkuRequest[1]; prStockList[0] = prStock; saveRequest.product.stockItems = prStockList; SaveProductResponse saveResponse = prodServ.SaveProduct(saveRequest); if (saveResponse.result.errorCode == null) { MessageBox.Show("ürün kaydedildi"); } else { MessageBox.Show("ürün kaydedilmedi"); MessageBox.Show(saveResponse.result.errorMessage); } }
private static Product getProdDetails(long prodId) { var authentication1 = new com.n11.api.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz com.n11.api.GetProductByProductIdRequest ProductRequest = new com.n11.api.GetProductByProductIdRequest(); ProductRequest.auth = authentication1; com.n11.api.ProductServicePortService port = new ProductServicePortService(); ProductRequest.productId = prodId; com.n11.api.GetProductByProductIdResponse response = port.GetProductByProductId(ProductRequest); var product = response.product; return product; }
private void btnGuncelle_Click(object sender, EventArgs e) { var authentication1 = new com.n11.api.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz ProductServicePortService prodServ = new ProductServicePortService(); }
private static Product product(long prodId) { var authentication1 = new com.n11.api.Authentication(); authentication1.appKey = apiAnahtari1; //api anahtarınız authentication1.appSecret = apiSifresi1;//api şifeniz ProductServicePortService proxy = new ProductServicePortService(); GetProductByProductIdRequest request = new GetProductByProductIdRequest(); request.auth = authentication1; request.productId = prodId; GetProductByProductIdResponse response = new GetProductByProductIdResponse(); var product = proxy.GetProductByProductId(request).product; return product; }