diff --git a/src/Resource/Account.php b/src/Resource/Account.php index db20109..f9ea8bc 100644 --- a/src/Resource/Account.php +++ b/src/Resource/Account.php @@ -139,10 +139,10 @@ public function get($moip_id) * * @return bool */ - public function checkExistence($tax_document) + public function checkExistence($tax_document, $type = 'tax_document') { try { - $this->getByPathNoPopulate(sprintf('/%s/%s/%s?tax_document=%s', MoipResource::VERSION, self::PATH, 'exists', $tax_document)); + $this->getByPathNoPopulate(sprintf('/%s/%s/%s?%s=%s', MoipResource::VERSION, self::PATH, 'exists', $type, $tax_document)); return true; } catch (ValidationException $e) {