Skip to content

Commit

Permalink
Merge pull request #10 from hborras/fix_delete_method_resource
Browse files Browse the repository at this point in the history
Fix delete method on resource
  • Loading branch information
hborras authored Jun 29, 2016
2 parents b78aa72 + 1478203 commit 8e5e961
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TwitterAds/Cursor.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public function fetchNext($params = [])
$response = $this->account->getTwitterAds()->put($this->account->getTwitterAds()->getResource(), $params);
break;
case 'DELETE':
$response = $this->account->getTwitterAds()->delete($this->account->getTwitterAds()->getResource(), $params);
$response = $this->account->getTwitterAds()->delete($this->account->getTwitterAds()->getResource());
break;
default:
$response = $this->account->getTwitterAds()->get($this->account->getTwitterAds()->getResource(), $params);
Expand Down
2 changes: 1 addition & 1 deletion src/TwitterAds/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ public function delete()
{
$resource = str_replace(static::RESOURCE_REPLACE, $this->account->getId(), static::RESOURCE);
$resource = str_replace(static::RESOURCE_ID_REPLACE, $this->getId(), $resource);
$request = $this->account->getTwitterAds()->put($resource, $this->toParams());
$request = $this->account->getTwitterAds()->delete($resource);
$this->fromResponse($request->data);
}

Expand Down

0 comments on commit 8e5e961

Please sign in to comment.