diff --git a/src/Cliente.php b/src/Cliente.php index abfbae1..1926b69 100755 --- a/src/Cliente.php +++ b/src/Cliente.php @@ -81,6 +81,15 @@ public function getByEmail($email){ $option = 'limit=1&email=' . $email; return $this->http->get('/customers', $option); } + + + //Retorna os dados do cliente de acordo com o CPF/CNPJ + public function getByCpf($cpf){ + $option = '?cpfCnpj=' . $cpf; + return $this->http->get('/customers', $option); + } + + // Insere um novo cliente public function create(array $dadosCliente){ @@ -185,4 +194,4 @@ public function cliente_valid($cliente) { return ! ( (empty($cliente['name']) OR empty($cliente['cpfCnpj']) OR empty($cliente['email'])) ? 1 : '' ); } -} \ No newline at end of file +}