public ProductRecommendations GetProductRecommendations(ProductRecommendationsRequest productRecommendationsRequest) { HttpWebRequest request = CatalogRequestBuilder.ConstructProductRecommendationsRequest(apiKey, productRecommendationsRequest); ProductRecommendations productRecommendations = ProcessBodylessRequest(request).ToObject <ProductRecommendations>(); return(productRecommendations); }
public void TestGetProductRecommendation() { ProductRecommendationsRequest productRecommendationsRequest = new ProductRecommendationsRequest(); productRecommendationsRequest.Id = "1004004012288125"; productRecommendationsRequest.IncludeAttributes = true; productRecommendationsRequest.Offers = new EnumTypes.OfferType[] { EnumTypes.OfferType.ALL }; productRecommendationsRequest.Offset = 0; productRecommendationsRequest.Limit = 10; ProductRecommendations productRecommendations = client.GetProductRecommendations(productRecommendationsRequest); Assert.IsNotNull(productRecommendations.Products); Assert.IsTrue(productRecommendations.Products.Count > 0); }