public static List <TopProductData> GetTopProducts(TopProductsType type, Int32 period, Int32 numRows, Int32 orderStatus, Guid ApiToken, String ApiServer) { return(Newtonsoft.Json.JsonConvert.DeserializeObject <List <TopProductData> >(Factory.GetResponse("Dashboards/GetTopProducts", "type=" + type + "&period=" + period + "&numRows=" + numRows + "&orderStatus=" + orderStatus + "", ApiToken, ApiServer), new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore })); }
/// <summary> /// Use this call to retrieve report about "Top ordered products" for top "10" products /// </summary> /// <param name="type">Used to specify type of report: 1 - group result by quantity, 2 - group result by turnover</param> /// <param name="period">Used to specify report number of months</param> /// <param name="numRows">Number of rows required</param> /// <param name="orderStatus">Order status</param> /// <returns>List of TopProductData</returns> public List <TopProductData> GetTopProducts(TopProductsType type, Int32 period, Int32 numRows, Int32 orderStatus) { var response = GetResponse("Dashboards/GetTopProducts", "type=" + type.ToString() + "&period=" + period + "&numRows=" + numRows + "&orderStatus=" + orderStatus + ""); return(JsonFormatter.ConvertFromJson <List <TopProductData> >(response)); }
public static List<TopProductData> GetTopProducts(TopProductsType type, Int32 period, Int32 numRows, Int32 orderStatus, String ApiToken, String ApiServer) { return Newtonsoft.Json.JsonConvert.DeserializeObject<List<TopProductData>>(Factory.GetResponse("Dashboards/GetTopProducts", "type=" + type + "&period=" + period + "&numRows=" + numRows + "&orderStatus=" + orderStatus + "", ApiToken, ApiServer), new JsonSerializerSettings { NullValueHandling = NullValueHandling.Ignore }); }