public static function createDummyBlockTicketRequestObjectWithoutTicket()
 {
     $requestBlockTicket = new RequestBlockTicket();
     $requestBlockTicket->setUserId(619);
     $requestBlockTicket->setClientId(-1);
     $requestBlockTicket->setPosId(4825);
     $requestBlockTicket->setTransactionNum(-1);
     return $requestBlockTicket;
 }
 /**
  * When a seat is selected we have to create a ticket and block it.
  * @param RequestBlockTicket $RequestBlockTicket
  * @return mixed
  * @throws RequestException
  */
 public function blockTicket(RequestBlockTicket $RequestBlockTicket)
 {
     $service_type = 'bloquearAsientos';
     $tickets_to_block['Boleto'] = TicketToBlockFactory::create($RequestBlockTicket->getTicket());
     $service_params = array('in0' => $RequestBlockTicket->getClientId(), 'in1' => $RequestBlockTicket->getUserId(), 'in2' => $RequestBlockTicket->getPosId(), 'in3' => $RequestBlockTicket->getTransactionNum(), 'in4' => $tickets_to_block, 'in5' => $this->usuario, 'in6' => $this->password);
     $soap_param = array('ventaService' => $service_params);
     $soap_response = $this->callSoapServiceByType($service_type, $soap_param);
     if (isset($this->logger)) {
         $this->logger->addNotice(print_r($service_params, true));
         $this->logger->addNotice(print_r($soap_response, true));
     }
     if (is_null($soap_response->out->Boleto->boletoId)) {
         $error_msg = 'The seat you are tying to block is already taken, please select a ' . 'different one or unblock this seat first.';
         throw new RequestException($error_msg);
     }
     $Boleto = $soap_response->out->Boleto;
     $ticket = $RequestBlockTicket->getTicket();
     $ticket->setTicketId($Boleto->boletoId);
     $ticket->setPrice($Boleto->precio);
     $ticket->setTransactionNum($Boleto->numOperacion);
     return $ticket;
 }