public GetProductCategoriesForASINResponse InvokeGetProductCategoriesForASIN() { // Create a request. GetProductCategoriesForASINRequest request = new GetProductCategoriesForASINRequest(); request.SellerId = sellerId; request.MWSAuthToken = mwsAuthToken; request.MarketplaceId = marketplaceId; string asin = "example"; request.ASIN = asin; return(this.client.GetProductCategoriesForASIN(request)); }
/** * Convert GetProductCategoriesForASINRequest to name value pairs */ private IDictionary <String, String> ConvertGetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { IDictionary <String, String> parameters = new Dictionary <String, String>(); parameters.Add("Action", "GetProductCategoriesForASIN"); if (request.IsSetSellerId()) { parameters.Add("SellerId", request.SellerId); } if (request.IsSetMarketplaceId()) { parameters.Add("MarketplaceId", request.MarketplaceId); } if (request.IsSetASIN()) { parameters.Add("ASIN", request.ASIN); } return(parameters); }
public GetProductCategoriesForASINResponse InvokeGetProductCategoriesForASIN(string sellerId, string mwsAuthToken, string marketplaceId, string asin, out APIResults results) { try { // Create a request. GetProductCategoriesForASINRequest request = new GetProductCategoriesForASINRequest(); request.SellerId = sellerId; request.MWSAuthToken = mwsAuthToken; request.MarketplaceId = marketplaceId; request.ASIN = asin; GetProductCategoriesForASINResponse output = this.productClient.GetProductCategoriesForASIN(request); results = new APIResults((IMWSResponse)output); return(output); } catch (MarketplaceWebServiceProductsException ex) { results = new APIResults(ex); throw ex; } }
public GetProductCategoriesForASINResponse GetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { return(newResponse <GetProductCategoriesForASINResponse>()); }
/// <summary> /// Get Product Categories For ASIN /// </summary> /// <param name="request">Get Product Categories For ASIN request</param> /// <returns>Get Product Categories For ASIN Response from the service</returns> /// <remarks> /// Gets categories information for a product identified by /// the MarketplaceId and ASIN. /// /// </remarks> public GetProductCategoriesForASINResponse GetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { return(Invoke <GetProductCategoriesForASINResponse>(ConvertGetProductCategoriesForASIN(request))); }
public GetProductCategoriesForASINResponse GetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { return(connection.Call( new MarketplaceWebServiceProductsClient.Request <GetProductCategoriesForASINResponse>("GetProductCategoriesForASIN", typeof(GetProductCategoriesForASINResponse), servicePath), request)); }
/// <summary> /// Get Product Categories For ASIN /// </summary> /// <param name="request">Get Product Categories For ASIN request</param> /// <returns>Get Product Categories For ASIN Response from the service</returns> /// <remarks> /// Gets categories information for a product identified by /// the MarketplaceId and ASIN. /// /// </remarks> public GetProductCategoriesForASINResponse GetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { return(Invoke <GetProductCategoriesForASINResponse>("GetProductCategoriesForASINResponse.xml")); }
public GetProductCategoriesForASINResponse GetProductCategoriesForASIN(GetProductCategoriesForASINRequest request) { return(this.connection.Call( new ImwsProductsServiceClient.Request <GetProductCategoriesForASINResponse>("GetProductCategoriesForASIN", typeof(GetProductCategoriesForASINResponse), this.servicePath), request)); }
/// <summary> /// Gets categories information for a product identified by /// the MarketplaceId and ASIN. /// /// </summary> /// <param name="service">Instance of MarketplaceWebServiceProducts service</param> /// <param name="request">GetProductCategoriesForASINRequest request</param> public static void InvokeGetProductCategoriesForASIN(MarketplaceWebServiceProducts service, GetProductCategoriesForASINRequest request) { try { GetProductCategoriesForASINResponse response = service.GetProductCategoriesForASIN(request); Console.WriteLine("Service Response"); Console.WriteLine("============================================================================="); Console.WriteLine(); Console.WriteLine(" GetProductCategoriesForASINResponse"); if (response.IsSetGetProductCategoriesForASINResult()) { Console.WriteLine(" GetProductCategoriesForASINResult"); GetProductCategoriesForASINResult getProductCategoriesForASINResult = response.GetProductCategoriesForASINResult; List <Categories> selfList = getProductCategoriesForASINResult.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); } }