public function execute($params)
    {
        $this->params = $params;
        $this->validate(new \Ebanx\Command\Validator($this->params));

        // Get the HTTP client from the registry
        $httpClient = \Ebanx\Config::getHttpClient();
        $client = new $httpClient();
        $client->setRequestParams($this->params)
               ->setMethod($this->method)
               ->setAction($this->action)
               ->setIgnoredStatusCodes($this->ignoredStatusCodes)
               ->setResponseType($this->_responseType);

        try {
            $source = \Ebanx\Config::getSourceData();
        } catch (\InvalidArgumentException $e) {
            $source = null;
        }

        if (!is_null($source)) {
            $client->setSource($source);
        }

        return $client->send();
    }
public function execute($params)
    {
        $this->params = $params;
        $this->validate(new \Ebanx\Command\Validator($this->params));

        // Get the HTTP client from the registry
        $httpClient = \Ebanx\Config::getHttpClient();
        $client = new $httpClient();
        $client->setRequestParams($this->params)
               ->setMethod($this->method)
               ->setAction($this->action)
               ->setIgnoredStatusCodes($this->ignoredStatusCodes)
               ->setResponseType($this->_responseType);

        try {
            $source = \Ebanx\Config::getSourceData();
        } catch (\InvalidArgumentException $e) {
            $source = null;
        }

        if (!is_null($source)) {
            $client->setSource($source);
        }

        return $client->send();
    }
public function execute ( $ params ) { $ this -> params = $ params ; $ this -> validate ( new \ Ebanx \ Command \ Validator ( $ this -> params ) ) ; // Get the HTTP client from the registry $ httpClient = \ Ebanx \ Config :: getHttpClient ( ) ; $ client = new $ httpClient ( ) ; $ client -> setRequestParams ( $ this -> params ) -> setMethod ( $ this -> method ) -> setAction ( $ this -> action ) -> setIgnoredStatusCodes ( $ this -> ignoredStatusCodes ) -> setResponseType ( $ this -> _responseType ) ; try { $ source = \ Ebanx \ Config :: getSourceData ( ) ; } catch ( \ InvalidArgumentException $ e ) { $ source = null ; } if ( ! is_null ( $ source ) ) { $ client -> setSource ( $ source ) ; } return $ client -> send ( ) ; }
Executes the command in the EBANX API
@param  array $params The request parameters
@return mixed
Executes the command in the EBANX API