Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Adcionando type em checkExistence #311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Resource/Account.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down