Get the request that corresponds to the service method.

@param string $method

@return string
@throws \BadMethodCallException
490449
protected function getRequestClassForMethod(string $method): string
    {
        if (in_array($method, ['login', 'logout'])) {
            return sprintf('DMT\\WebservicesNl\\Client\\Request\\%sRequest', ucfirst($method));
        }

        foreach ($this->getInstalledServices() as $service) {
            if (stripos($method, $service) !== 0) {
                continue;
            }

            $requestClass = sprintf(
                'DMT\\WebservicesNl\\%s\\Request\\%sRequest',
                $service,
                substr($method, strlen($service))
            );

            if (class_exists($requestClass)) {
                return $requestClass;
            }
        }

        throw new \BadMethodCallException("Function `$method` is not a valid method for this service");
    }
1198202
protected function getEndpoint($method)
    {
        $endpoint = "calls";
        $searchParams = $this->getArgument("search_params");
        if (!is_null($searchParams)) {
            $queryString = http_build_query($searchParams);
            $this->delArgument("search_params");
            return "$endpoint?$queryString";
        }
        return $endpoint;
    }
345670
public function set( $method )
	{
		$method		= strtoupper( $method );
		if( !in_array( $method, self::$methods ) )
			throw new BadMethodCallException( 'HTTP method "%s" is not supported' );
		$this->method	= $method;
		return $this;
	}
611746
public function getRoutesByMethod($method)
	{
		return ($this->routesByMethod && isset($this->routesByMethod[$method])) ? $this->routesByMethod[$method] : array();
	}
1129471
public function get(string $key)
    {
        if ($this->replacedPayload) {
            if (! \array_key_exists($key, $this->payload)) {
                throw new \BadMethodCallException("Message payload of {$this->messageName()} does not contain a key $key.");
            }

            return $this->payload[$key];
        }

        if ($key !== self::MESSAGE) {
            throw new \BadMethodCallException(__CLASS__ . ' payload only contains a ' . self::MESSAGE . ' key.');
        }

        return $this->message;
    }
874807
protected function getEndpoint($method)
    {
        $endpoint = "tariffs";
        $countryIso = $this->getArgument("id");
        if (!is_null($countryIso)) {
            $endpoint .= "/$countryIso";
            $this->delArgument("id");
        }
        return $endpoint;
    }
285558
protected function request($method, array $data = array())
    {
        $auth = base64_encode($this->username . ':' . $this->password);
        $header = "Authorization: Basic $auth";
        $opts = array(
            'http' => array(
                'method' => 'GET',
                'header' => $header
            )
        );
        $ctx = stream_context_create($opts);

        $client = new \SoapClient(
            $this->endpoint . '/wsdl',
            array(
                'location' => $this->endpoint,
                'exceptions' => 1,
                'stream_context' => $ctx,
                'trace' => true
            )
        );

        $response = call_user_func_array(array($client, $method), $data);
        if (isset($response->return)) {
            return $response->return;
        }

        return null;
    }
598351
final public function get($method = null) {

        if ( empty($method) ) {

            $return = $this->rpc_methods;

        } else if ( array_key_exists($method, $this->rpc_methods) ) {

            $return = $this->rpc_methods[$method];

        } else {

            $return = null;

        }

        return $return;

    }
1122237
public function getOperation($method) {
		if (!$this->operations->has($method)) {
			$this->operations->set($method, new Operation());
		}

		return $this->operations->get($method);
	}
1352204
private function getCompressionMethod($method)
    {
        $compression_method = $this->getCompressionManager()->getCompressionAlgorithm($method);
        Assertion::notNull($compression_method, sprintf('Compression method "%s" not supported', $method));

        return $compression_method;
    }
568614
public function getRequest($param, $method = null)
    {
        if ($method === null) {
            $method = $this->_sendMethod;
        }

        $method = Str::lowerCase($method);
        // get root request as array or string
        switch ($method) {
            case 'get':
                $request = App::$Request->query->get($this->getFormName(), null);
                break;
            case 'post':
                $request = App::$Request->request->get($this->getFormName(), null);
                break;
            case 'file':
                $request = App::$Request->files->get($this->getFormName(), null);
                break;
            default:
                $request = App::$Request->get($this->getFormName(), null);
                break;
        }

        $response = null;
        // param is a dot-separated array type
        if (Str::contains('.', $param)) {
            $response = $request;
            foreach (explode('.', $param) as $path) {
                if ($response !== null && !array_key_exists($path, $response)) {
                    return null;
                }
                // find deep array nesting offset
                $response = $response[$path];
            }
        } else {
            $response = $request[$param];
        }

        return $response;
    }
191139
public function getRequest()
    {
        if (null === $this->request) {
            @trigger_error(sprintf('Calling the "%s()" method before the "request()" one is deprecated since Symfony 4.1 and will throw an exception in 5.0.', \get_class($this).'::'.__FUNCTION__), E_USER_DEPRECATED);
            // throw new BadMethodCallException(sprintf('The "request()" method must be called before "%s()".', __METHOD__));
        }

        return $this->request;
    }
747324
private function getUrl($method)
    {
        return sprintf(
            $this::API_URL,
            $this->getDc(),
            $this->getApiVersion(),
            $method
        );
    }
343589
public function get($method = null)
    {
        return is_null($method) ? $this->getRoutes() : Arr::get($this->routes, $method, []);
    }
1161652
protected function getEndpoint($method)
    {
        $endpoint = 'me/password';
        $reset = $this->getArgument('reset');
        $nonce = $this->getArgument('nonce');
        if (!is_null($reset)) {
            $endpoint .= '/reset';
            $this->delArgument('reset');
        }
        if (!is_null($nonce)) {
            $endpoint .= "/$nonce";
            $this->delArgument('nonce');
        }
        return $endpoint;
    }
658552
private function getMethodSignature($method)
    {
        $validMethod = isset($this->methods[$method])
            && is_array($this->methods[$method])
            && count($this->methods[$method]) >= 2;

        if ($validMethod) {
            return $this->methods[$method];
        }

        return null;
    }
852319
public function getService($service)
    {
        $service = $this->mapServiceName($service);

        if (isset($this->services[$service])) {
            return $this->services[$service];
        }

        return $this->services[$service] = $this->createService($service);
    }