using RestSharp; using System; using System.Collections.Generic; using Tanshu.Accounts.Contracts; namespace Tanshu.Accounts.Repository { public static class SalesAnalysisBI { public static IList GetSale(DateTime startDate, DateTime finishDate) { var request = new RestRequest(); request.Resource = "SaleAnalysis/Sale.json"; request.AddQueryParameter("s", startDate.ToString("dd-MMM-yyyy HH:mm")); request.AddQueryParameter("f", finishDate.ToString("dd-MMM-yyyy HH:mm")); return JsonStore.Execute>(request); } public static IList GetSettlements(DateTime startDate, DateTime finishDate) { var request = new RestRequest(); request.Resource = "SaleAnalysis/Settlements.json"; request.AddQueryParameter("s", startDate.ToString("dd-MMM-yyyy HH:mm")); request.AddQueryParameter("f", finishDate.ToString("dd-MMM-yyyy HH:mm")); return JsonStore.Execute>(request); } public static SalesAnalysis GetServiceCharge(DateTime startDate, DateTime finishDate) { var request = new RestRequest(); request.Resource = "SaleAnalysis/ServiceCharge.json"; request.AddQueryParameter("s", startDate.ToString("dd-MMM-yyyy HH:mm")); request.AddQueryParameter("f", finishDate.ToString("dd-MMM-yyyy HH:mm")); return JsonStore.Execute(request); } public static IList GetServiceTax(DateTime startDate, DateTime finishDate) { var request = new RestRequest(); request.Resource = "SaleAnalysis/ServiceTax.json"; request.AddQueryParameter("s", startDate.ToString("dd-MMM-yyyy HH:mm")); request.AddQueryParameter("f", finishDate.ToString("dd-MMM-yyyy HH:mm")); return JsonStore.Execute>(request); } public static IList GetVat(DateTime startDate, DateTime finishDate) { var request = new RestRequest(); request.Resource = "SaleAnalysis/Vat.json"; request.AddQueryParameter("s", startDate.ToString("dd-MMM-yyyy HH:mm")); request.AddQueryParameter("f", finishDate.ToString("dd-MMM-yyyy HH:mm")); return JsonStore.Execute>(request); } } }