Inheritance: MWSClientCsRuntime.AbstractMwsObject
        /// <summary>
        /// Gets categories information for a product identified by
        /// the SellerId and SKU.
        /// 
        /// </summary>
        /// <param name="service">Instance of MarketplaceWebServiceProducts service</param>
        /// <param name="request">GetProductCategoriesForSKURequest request</param>
        public static void InvokeGetProductCategoriesForSKU(MarketplaceWebServiceProducts service, GetProductCategoriesForSKURequest request)
        {
            try
            {
                GetProductCategoriesForSKUResponse response = service.GetProductCategoriesForSKU(request);

                Console.WriteLine ("Service Response");
                Console.WriteLine ("=============================================================================");
                Console.WriteLine ();

                Console.WriteLine("        GetProductCategoriesForSKUResponse");
                if (response.IsSetGetProductCategoriesForSKUResult())
                {
                    Console.WriteLine("            GetProductCategoriesForSKUResult");
                    GetProductCategoriesForSKUResult  getProductCategoriesForSKUResult = response.GetProductCategoriesForSKUResult;
                    List<Categories> selfList = getProductCategoriesForSKUResult.Self;
                    foreach (Categories self in selfList)
                    {
                        Console.WriteLine("                Self");
                        if (self.IsSetProductCategoryId())
                        {
                            Console.WriteLine("                    ProductCategoryId");
                            Console.WriteLine("                        {0}", self.ProductCategoryId);
                        }
                        if (self.IsSetProductCategoryName())
                        {
                            Console.WriteLine("                    ProductCategoryName");
                            Console.WriteLine("                        {0}", self.ProductCategoryName);
                        }
                    }
                }
                if (response.IsSetResponseMetadata())
                {
                    Console.WriteLine("            ResponseMetadata");
                    ResponseMetadata  responseMetadata = response.ResponseMetadata;
                    if (responseMetadata.IsSetRequestId())
                    {
                        Console.WriteLine("                RequestId");
                        Console.WriteLine("                    {0}", responseMetadata.RequestId);
                    }
                }
                Console.WriteLine("            ResponseHeaderMetadata");
                Console.WriteLine("                RequestId");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.RequestId);
                Console.WriteLine("                ResponseContext");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.ResponseContext);
                Console.WriteLine("                Timestamp");
                Console.WriteLine("                    " + response.ResponseHeaderMetadata.Timestamp);
                Console.WriteLine();

            }
            catch (MarketplaceWebServiceProductsException ex)
            {
                Console.WriteLine("Caught Exception: " + ex.Message);
                Console.WriteLine("Response Status Code: " + ex.StatusCode);
                Console.WriteLine("Error Code: " + ex.ErrorCode);
                Console.WriteLine("Error Type: " + ex.ErrorType);
                Console.WriteLine("Request ID: " + ex.RequestId);
                Console.WriteLine("XML: " + ex.XML);
                Console.WriteLine("ResponseHeaderMetadata: " + ex.ResponseHeaderMetadata);
            }
        }
 public GetProductCategoriesForSKUResponse InvokeGetProductCategoriesForSKU()
 {
     // Create a request.
     GetProductCategoriesForSKURequest request = new GetProductCategoriesForSKURequest();
     string sellerId = "example";
     request.SellerId = sellerId;
     string mwsAuthToken = "example";
     request.MWSAuthToken = mwsAuthToken;
     string marketplaceId = "example";
     request.MarketplaceId = marketplaceId;
     string sellerSKU = "example";
     request.SellerSKU = sellerSKU;
     return this.client.GetProductCategoriesForSKU(request);
 }
Exemple #3
0
 public GetProductCategoriesForSKUResponse GetProductCategoriesForSKU(GetProductCategoriesForSKURequest request)
 {
     throw new NotImplementedException();
 }