src/Amadeus/Client.php
protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
    {
        $messageOptions = $this->makeMessageOptions($messageOptions, $endSession);

        $this->lastMessage = $messageName;

        $sendResult = $this->sessionHandler->sendMessage(
            $messageName,
            $this->requestCreator->createRequest(
                $messageName,
                $options
            ),
            $messageOptions
        );

        $response = $this->responseHandler->analyzeResponse(
            $sendResult,
            $messageName
        );

        if ($messageOptions['returnXml'] === false) {
            $response->responseXml = null;
        }

        return $response;
    }
protected function callMessage($messageName, $options, $messageOptions, $endSession = false)
    {
        $messageOptions = $this->makeMessageOptions($messageOptions, $endSession);

        $this->lastMessage = $messageName;

        $sendResult = $this->sessionHandler->sendMessage(
            $messageName,
            $this->requestCreator->createRequest(
                $messageName,
                $options
            ),
            $messageOptions
        );

        $response = $this->responseHandler->analyzeResponse(
            $sendResult,
            $messageName
        );

        if ($messageOptions['returnXml'] === false) {
            $response->responseXml = null;
        }

        return $response;
    }
Call a message with the given parameters

@param string $messageName
@param RequestOptions\RequestOptionsInterface $options
@param array $messageOptions
@param bool $endSession
@return Result
@throws Client\Exception
@throws Client\Struct\InvalidArgumentException
@throws Client\InvalidMessageException
@throws Client\RequestCreator\MessageVersionUnsupportedException
@throws \RuntimeException
@throws \InvalidArgumentException