public static string ExecutePaginatedAirCallService(AirCallApiTask airCallApiTask)
        {
            var airCallModelList = new List <string>();
            var airCallResult    = airCallApiTask.Start();

            airCallModelList.Add(airCallResult);

            var listOfCalls        = JsonConvert.DeserializeObject <AirCallModel>(airCallResult);
            var airCallNextPageUrl = listOfCalls.Meta.NextPageLink;

            do
            {
                if (!string.IsNullOrEmpty(airCallNextPageUrl))
                {
                    airCallResult = airCallApiTask.Start(null, airCallNextPageUrl);
                    if (airCallResult != null)
                    {
                        airCallModelList.Add(airCallResult);
                        var deserializedObject = JsonConvert.DeserializeObject <AirCallModel>(airCallResult);
                        airCallNextPageUrl = deserializedObject.Meta.NextPageLink;
                    }
                }
            } while (!string.IsNullOrEmpty(airCallNextPageUrl));

            return(JsonHelper.MergeJsonStringValues(airCallModelList));
        }
 public ApiOrchestrator()
 {
     _airCallApiTask             = new AirCallApiTask();
     _freshServiceApiTask        = new FreshServiceApiTask();
     _statisticsService          = new StatisticsService();
     _freshServiceDepartmentTask = new FreshServiceDepartmentTask();
     _freshServiceRequesterTask  = new FreshServiceRequesterTask();
     _freshServiceAgentsTask     = new FreshServiceAgentsTask();
 }