protected function parseResponse(array $response)
    {
        if (empty($response['scheduledFlights'])) {
            return [];
        }

        $airlines = $this->parseAirlines($response['appendix']['airlines']);

        $airports = $this->parseAirports($response['appendix']['airports']);

        $flights = [];

        foreach ($response['scheduledFlights'] as $flight) {
            // Set the carrier
            $carrier = $airlines[$flight['carrierFsCode']];

            $flight['carrier'] = $carrier;

            // Set the departure airport
            $departureAirport = $airports[$flight['departureAirportFsCode']];

            $flight['departureAirport'] = $departureAirport;

            // Set the arrival airport
            $arrivalAirport = $airports[$flight['arrivalAirportFsCode']];

            $flight['arrivalAirport'] = $arrivalAirport;

            // Set the UTC departure time
            $flight['departureDate'] = [
                'dateLocal' => $flight['departureTime'],
                'dateUtc' => $this->dateToUtc(
                    $flight['departureTime'],
                    $departureAirport['timeZoneRegionName']
                ),
            ];

            // Set the UTC arrival time
            $flight['arrivalDate'] = [
                'dateLocal' => $flight['arrivalTime'],
                'dateUtc' => $this->dateToUtc(
                    $flight['arrivalTime'],
                    $arrivalAirport['timeZoneRegionName']
                ),
            ];

            $flights[] = $flight;
        }

        return $flights;
    }