This method makes request to the API.
@property \bl\cms\novaposhta\frontend\Module $module

@param string $modelName
@param string $calledMethod
@param array $methodProperties
@return string

@throws BadRequestHttpException
@throws NotFoundHttpException
195796
private function getResponse($modelName, $calledMethod, $methodProperties = [])
    {

        if (\Yii::$app->request->isAjax) {
            $data =
                [
                    'apiKey' => $this->module->apiKey,
                    'modelName' => $modelName,
                    'calledMethod' => $calledMethod,
                    'methodProperties' => $methodProperties
                ];

            $client = new Client();
            $response = $client->createRequest()
                ->setFormat($this->module->format)
                ->setMethod('post')
                ->setUrl("{$this->module->requestUrl}/{$this->module->apiVersion}/{$this->module->format}/")
                ->setData($data)
                ->send();
            if ($response->isOk) {
                return $response;
            }
            else throw new BadRequestHttpException();
        }
        else throw new NotFoundHttpException();
    }
1285506
@Override
    public <R> R callMethod(String methodName, long timeout) throws CouldNotPerformException, InterruptedException {
        return callMethod(methodName, null, timeout);
    }
837292
function (methodName) {
            var params = this.getParameters(methodName),
                ret;
            params.forEach(function (param) {
                if (param && (param.envelope === 'JSON' ||
                        param.envelope === 'ENTITY')) {
                    ret = param;
                }
            });
            return ret;
        }
158805
public function fireMethod($methodName)
	{
		if($this->reflection->hasMethod($methodName))
		{
			$method = $this->reflection->getMethod($methodName);
			$instance = $this->reflection->newInstance();
			return $method->invokeArgs($instance, $this->match['params']);
		}
		
		throw new InvalidClassMethodCalled($methodName, $this->match['raw']);		
	}
722170
protected function callModulesMethod($methodName)
    {
        $modules = Yii::$app->getModules();
        $returns = [];

        foreach ($modules as $moduleName => $module)
        {
            if (is_array($module)) {
                $module = Yii::$app->getModule($moduleName);
            }

            if (method_exists($module, $methodName)) {
                $returns[] = $module->$methodName();
            }
        }

        return $returns;
    }
1239523
public function callMethod (&$api, $module, $method, $args = array ())
	{
		
		// Set module class name
		
		$class		= $this->getModuleClass ($module);
		
		// Create module object
		
		$obj		= new $class;
		
		// Set the API reference
		
		$obj->api	= $api;
		
		// Call the method init function for any custom code before the action
		
		if ($obj->callInit ($this, $method, $args))
		{
			
			// Call module method and pass the arguments list as 
			
			$return	= call_user_func_array (array ($obj, $method), array ($args));
			
		}
		
		// Return result
		
		return $obj->getResult ();
		
	}
1270952
@Override
	public List<String> getModules() throws BadRequestException {
		final String sourceMethod = "getModules"; //$NON-NLS-1$
		if (isTraceLogging) {
			log.entering(RequestedModuleNames.class.getName(), sourceMethod);
		}
		if (modules == null) {
			modules = decodeModules(moduleQueryArg, base64decodedIdList, true);
			if (modules.size() != count) {
				throw new BadRequestException();
			}
		}
		if (isTraceLogging) {
			log.exiting(RequestedModuleNames.class.getName(), sourceMethod, modules);
		}
		return modules;
	}
822819
private function get_controller_callable( $method_name ) {
		// Let's see if we have a current controller instanciated
		if ( is_object( $this->controller ) && !is_null( $this->controller ) ) {

			// Define a callable method as an array
			$callable = array( $this->controller, $method_name ); // Give the controller class and the name of the method

			// Check if the method is actually callable/exists
			if ( is_callable( $callable, false ) ) {
				return $callable;
			}
		}

		return false;
	}
689708
function getMethod(methodname) {
  if (controllers[methodname]) {
    return function(call, callback) {
      console.log(call);
      return controllers[methodname](call, callback);
    };
  } else {
    return function(call, callback) {
      // By default we print an empty response.
      callback(null, {});
    };
  }
}
115840
private function addMethodMap()
    {
        if (!$definitions = $this->container->getDefinitions()) {
            return '';
        }

        $code = "        \$this->methodMap = array(\n";
        ksort($definitions);
        foreach ($definitions as $id => $definition) {
            $code .= '            '.$this->export($id).' => '.$this->export($this->generateMethodName($id)).",\n";
        }

        return $code."        );\n";
    }
1317229
function getMethod($methodName)
    {
        if (!$this->hasMethod($methodName))
            throw new \Exception(sprintf(
                'Method (%s) not found.'
                , $methodName
            ));

        if (isset($this->_t__methods[$methodName])) {
            ## from bind closure
            $methodCallable = $this->_t__methods[$methodName];
        } else {
            $bindTo = $this->getBindTo();
            $methodCallable = function() use($methodName, $bindTo) {
                return call_user_func_array([$bindTo, $methodName], func_get_args());
            };
        }

        ## bind it into latest bind object
        $methodCallable = \Closure::bind(
            $methodCallable
            , $this->getBindTo()
            , get_class($this->getBindTo())
        );

        return $methodCallable;
    }
1101137
public function callMethod($resourceNamePlural, $methodName, $arguments = [])
    {
        $controller = $this->createController($resourceNamePlural);

        if (method_exists($controller, $methodName) == false) {
            throw new InvalidMethodException('The method ('.$methodName.') does not exist for the class '.get_class($controller));
        }
        return call_user_func_array([$controller, $methodName], $arguments);
    }
951086
private function getPagedListResponse(
        $methodName,
        array $optionalArgs,
        $decodeType,
        Message $request,
        $interfaceName = null
    ) {
        $callStack = $this->createCallStack(
            $this->configureCallConstructionOptions($methodName, $optionalArgs)
        );
        $descriptor = new PageStreamingDescriptor(
            $this->descriptors[$methodName]['pageStreaming']
        );
        $callStack = new PagedMiddleware($callStack, $descriptor);

        $call = new Call(
            $this->buildMethod($interfaceName, $methodName),
            $decodeType,
            $request,
            [],
            Call::UNARY_CALL
        );

        $this->modifyUnaryCallable($callStack);
        return $callStack($call, $optionalArgs)->wait();
    }
1098488
public function methodMatch($methods, $requestMethod, Request $request)
    {
        $match = false;
        if ($requestMethod === null) {
            $requestMethod = ($request->getRequestMethod()) ? $request->getRequestMethod() : 'GET';
        }
        $methods = explode('|', $methods);
        foreach ($methods as $method) {
            if (strcasecmp($requestMethod, $method) === 0) {
                $match = true;
                break;
            } else {
                continue;
            }
        }
        if ($match === true) {
            return true;
        }

        return false;
    }
1213496
public static Object callMethod(Object obj, String methodName, Object[] args) throws PageException {
	return callMethod(obj, KeyImpl.getInstance(methodName), args);
    }
1231154
protected function createNormalizeMethod($modelFqdn, Context $context, $properties)
    {
        $context->refreshScope();
        $dataVariable = new Expr\Variable('data');
        $statements = [
            new Expr\Assign($dataVariable, new Expr\New_(new Name('\\stdClass'))),
        ];

        /** @var Property $property */
        foreach ($properties as $property) {
            $propertyVar = new Expr\MethodCall(new Expr\Variable('object'), $this->getNaming()->getPrefixedMethodName('get', $property->getName()));
            list($normalizationStatements, $outputVar) = $property->getType()->createNormalizationStatement($context, $propertyVar);

            $normalizationStatements[] = new Expr\Assign(new Expr\PropertyFetch($dataVariable, sprintf("{'%s'}", $property->getName())), $outputVar);

            if ($property->isNullable()) {
                $statements = array_merge($statements, $normalizationStatements);

                continue;
            }

            $statements[] = new Stmt\If_(
                new Expr\BinaryOp\NotIdentical(new Expr\ConstFetch(new Name('null')), $propertyVar),
                [
                    'stmts' => $normalizationStatements,
                ]
            );
        }

        $statements[] = new Stmt\Return_($dataVariable);

        return new Stmt\ClassMethod('normalize', [
            'type' => Stmt\Class_::MODIFIER_PUBLIC,
            'params' => [
                new Param('object'),
                new Param('format', new Expr\ConstFetch(new Name('null'))),
                new Param('context', new Expr\Array_(), 'array'),
            ],
            'stmts' => $statements,
        ]);
    }
483402
public function call($methodName, array $params = array())
    {
        $options = array_merge($this->defaultApiOptions, $this->createConfigByMethodName($methodName));
        if (in_array($methodName, $this->postMethodNames)) {
            if (!($methodName == 'account/settings' && empty($params))) {
                $options['http'] = 'post';
            }
        }
        return $this->internalCall($methodName, $options, $params);
    }