-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from Webklex/master
Webhooks support added
- Loading branch information
Showing
2 changed files
with
59 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<?php | ||
|
||
namespace Devio\Pipedrive\Resources; | ||
|
||
use Devio\Pipedrive\Exceptions\PipedriveException; | ||
use Devio\Pipedrive\Http\Request; | ||
use Devio\Pipedrive\Resources\Basics\Entity; | ||
use Devio\Pipedrive\Resources\Basics\Resource; | ||
|
||
class Webhooks extends Resource | ||
{ | ||
/** | ||
* The API caller object. | ||
* | ||
* @var Request | ||
*/ | ||
protected $request; | ||
|
||
/** | ||
* List of abstract methods available. | ||
* | ||
* @var array | ||
*/ | ||
protected $enabled = ['add', 'delete', 'find']; | ||
|
||
/** | ||
* List of abstract methods disabled. | ||
* | ||
* @var array | ||
*/ | ||
protected $disabled = []; | ||
|
||
/** | ||
* Get the entity details by ID. | ||
* | ||
* @param $id Entity ID to find. | ||
* @return \Devio\Pipedrive\Http\Response|void | ||
* @throws PipedriveException | ||
*/ | ||
public function find($id) | ||
{ | ||
throw new PipedriveException("The method find() is not available for the resource {$this->getName()}"); | ||
} | ||
|
||
/** | ||
* Update an entity by ID. | ||
* @param $id | ||
* @param array $values | ||
* | ||
* @return \Devio\Pipedrive\Http\Response|void | ||
* @throws PipedriveException | ||
*/ | ||
public function update($id, array $values) | ||
{ | ||
throw new PipedriveException("The method update() is not available for the resource {$this->getName()}"); | ||
} | ||
} |