/**
  * @param array $customersData
  * @return Customers
  */
 public static function createCustomers(array $customersData)
 {
     $customers = new Customers();
     foreach ($customersData as $customerData) {
         $customers->append(CustomerFactory::create($customerData));
     }
     return $customers;
 }
 /**
  * @param array $ticketData
  * @return Ticket
  */
 public static function create(array $ticketData)
 {
     self::validateRequiredFields($ticketData);
     $ticket = new Ticket();
     $ticket->setId($ticketData["_id"]);
     $ticket->setSerie($ticketData["_serie"]);
     $ticket->setFrom($ticketData["_from"]);
     $ticket->setTo($ticketData["_vTO"]);
     $departureDateTime = \DateTime::createFromFormat("Ymd H:i", $ticketData["_departure_date"] . " " . $ticketData["_departure_time"]);
     $ticket->setDepartureDateTime($departureDateTime);
     $ticket->setService($ticketData["_service"]);
     $ticket->setCustomer(CustomerFactory::create(["name" => $ticketData["_customer"]["_name"], "category" => $ticketData["_customer"]["_category"], "seat" => $ticketData["_customer"]["_seat"]]));
     $ticket->setTotal($ticketData["_total"]);
     $ticket->setTax($ticketData["_tax"]);
     $ticket->setTimeStamp($ticketData["_time_stamp"]);
     $ticket->setAuthorization($ticketData["_auth"]);
     return $ticket;
 }