/** * @return \Ochoa\Type\SeatMap */ public static function getSetMap() { $seats = [["Puesto" => 1, "Disponible" => true], ["Puesto" => 2, "Disponible" => true]]; return SeatMapFactory::create($seats); }
/** * @param $from * @param $to * @param $schedule * @return \Ochoa\Type\SeatMap * @throws \Ochoa\Exceptions\ResponseException */ public function getSeatMap($from, $to, $schedule) { $params = ["strNumeroRodamiento" => $schedule, "strLocalidadOrigen" => $from, "strLocalidadDestino" => $to]; $this->setHeaderSoap("ConsultarEstadoPuestos"); $seats = $this->call("ConsultarEstadoPuestos", $params); if (!Validate::validSeatMap($seats)) { throw new ResponseException("Not found seats"); } $seatMap = SeatMapFactory::create($seats->ConsultarEstadoPuestosResult->ListaPuestos->PuestoRodamientoTO); return $seatMap; }