src/Resource/Account.php
public function checkExistence($tax_document)
    {
        try {
            $this->getByPathNoPopulate(sprintf('/%s/%s/%s?tax_document=%s', MoipResource::VERSION, self::PATH, 'exists', $tax_document));

            return true;
        } catch (ValidationException $e) {
            if ($e->getStatusCode() != 404) {
                throw new ValidationException($e->getStatusCode(), $e->getErrors());
            }
        }

        return false;
    }
public function checkExistence($tax_document)
    {
        try {
            $this->getByPathNoPopulate(sprintf('/%s/%s/%s?tax_document=%s', MoipResource::VERSION, self::PATH, 'exists', $tax_document));

            return true;
        } catch (ValidationException $e) {
            if ($e->getStatusCode() != 404) {
                throw new ValidationException($e->getStatusCode(), $e->getErrors());
            }
        }

        return false;
    }
public function checkExistence ( $ tax_document ) { try { $ this -> getByPathNoPopulate ( sprintf ( '/%s/%s/%s?tax_document=%s' , MoipResource :: VERSION , self :: PATH , 'exists' , $ tax_document ) ) ; return true ; } catch ( ValidationException $ e ) { if ( $ e -> getStatusCode ( ) != 404 ) { throw new ValidationException ( $ e -> getStatusCode ( ) , $ e -> getErrors ( ) ) ; } } return false ; }
Check if an account exists.

@param string $tax_document

@return bool
Check if an account exists .