From c08db7bdbab4c2d5e271ba09c4606596a6718e75 Mon Sep 17 00:00:00 2001 From: Mateus Neves Date: Mon, 3 Sep 2018 13:47:06 -0300 Subject: [PATCH] =?UTF-8?q?ajuste=20no=20m=C3=A9todo=20para=20listar=20por?= =?UTF-8?q?=20cnpj;=20atualizando=20vers=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer.json | 2 +- src/empresaApi.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index c8e8767..c107d0d 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "simplesvet/enotas", - "version": "2.3", + "version": "2.4", "description": "eNotasGW API", "type": "package", "require": { diff --git a/src/empresaApi.php b/src/empresaApi.php index fc08675..d4fe247 100644 --- a/src/empresaApi.php +++ b/src/empresaApi.php @@ -28,18 +28,18 @@ public function consultar($idEmpresa) } /** - * Listar empresa por sua Razão Social + * Listar empresa por CNPJ * - * @param string $razaoSocial + * @param string $cnpj */ - public function consultarPorRazaoSocial($razaoSocial) + public function consultarPorCnpj($cnpj) { return $this->callOperation(array( 'method' => 'GET', - 'path' => '/empresas?pageNumber=0&pageSize=1&searchBy=Razao_Social&searchTerm={razaoSocial}', + 'path' => '/empresas?pageNumber=0&pageSize=1&searchTerm={cnpj}', 'parameters' => array( 'path' => array( - 'razaoSocial' => $razaoSocial + 'cnpj' => $cnpj ) ) ));