Example #1
0
        public string Allocate(
            string bookingsJson,
            string previousScheduleJson,
            string currentStatusJson,
            string flexPlanJson,
            DateTime startUTC,
            DateTime endUTC,
            BookingFillMethod fillMethod,
            string scheduleId,
            string downtimesJson)
        {
            var bookings         = DeserializeObject <SeedOrders.UnscheduledStatus>(bookingsJson);
            var previousSchedule = PlannedSchedule.FromJson(previousScheduleJson);
            var status           = CurrentStatus.FromJson(currentStatusJson);
            var plan             = DeserializeObject <FlexPlan>(flexPlanJson);
            var downtimes        = DeserializeObject <List <StationDowntime> >(downtimesJson);
            var result           = _allocate.Allocate(
                bookings, previousSchedule, status, plan, startUTC,
                endUTC, fillMethod, scheduleId,
                downtimes);

            return(SerializeObject(result));
        }