From c9d1cd938ae4315c00e25d9504f5926d17563f04 Mon Sep 17 00:00:00 2001 From: elisei Date: Fri, 7 Jun 2019 11:00:37 -0300 Subject: [PATCH] Adcionando type em checkExistence --- src/Resource/Account.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {