Ejemplo n.º 1
0
        public static void SetAvailiableQuantity(Article article, Int32 quantity)
        {
            try
            {
                var articleNumber = article.MasterArticle == null ? article.ArticleNumber : article.MasterArticle.ArticleNumber;
                SellingManagerProductType ebayProduct = EbayController.GetSellingManagerProductTypeByArticle(articleNumber);

                if (ebayProduct != null)
                {
                    ReviseSellingManagerProductRequestType request = new ReviseSellingManagerProductRequestType();
                    request.SellingManagerProductDetails = ebayProduct.SellingManagerProductDetails;
                    request.SellingManagerProductDetails.QuantityAvailable = quantity;
                    request.SellingManagerProductSpecifics = new SellingManagerProductSpecificsType();

                    ReviseSellingManagerProductCall call = new ReviseSellingManagerProductCall(EbayController.GetApiContext());
                    call.ExecuteRequest(request);
                }
            }
            catch (Exception ex)
            {
                throw new Exception("Can set ebay quantity availiable for " + article.ArticleNumber, ex);
            }
        }
		/// <summary>
		/// 
		/// </summary>
		/// <param name="ApiContext">The <see cref="ApiCall.ApiContext"/> for this API Call of type <see cref="ApiContext"/>.</param>
		public ReviseSellingManagerProductCall(ApiContext ApiContext)
		{
			ApiRequest = new ReviseSellingManagerProductRequestType();
			this.ApiContext = ApiContext;
		}
		/// <summary>
		/// 
		/// </summary>
		public ReviseSellingManagerProductCall()
		{
			ApiRequest = new ReviseSellingManagerProductRequestType();
		}
 /// <summary>
 ///
 /// </summary>
 /// <param name="ApiContext">The <see cref="ApiCall.ApiContext"/> for this API Call of type <see cref="ApiContext"/>.</param>
 public ReviseSellingManagerProductCall(ApiContext ApiContext)
 {
     ApiRequest      = new ReviseSellingManagerProductRequestType();
     this.ApiContext = ApiContext;
 }
 /// <summary>
 ///
 /// </summary>
 public ReviseSellingManagerProductCall()
 {
     ApiRequest = new ReviseSellingManagerProductRequestType();
 }