diff --git a/src/Benhawker/Pipedrive/Library/OrganizationFields.php b/src/Benhawker/Pipedrive/Library/OrganizationFields.php new file mode 100644 index 0000000..3342e13 --- /dev/null +++ b/src/Benhawker/Pipedrive/Library/OrganizationFields.php @@ -0,0 +1,56 @@ +curl = $master->curl(); + } + + /** + * Returns all organization fields + * + * @return array returns all organizationFields + */ + public function getAll() + { + return $this->curl->get('organizationFields'); + } + + /** + * Returns a organization field + * + * @param int $id pipedrive organizationField id + * @return array returns details of a organizationField + */ + public function getById($id) + { + return $this->curl->get('organizationFields/' . $id); + } + +} diff --git a/src/Benhawker/Pipedrive/Pipedrive.php b/src/Benhawker/Pipedrive/Pipedrive.php index 1fe7b18..7e578c2 100644 --- a/src/Benhawker/Pipedrive/Pipedrive.php +++ b/src/Benhawker/Pipedrive/Pipedrive.php @@ -87,6 +87,11 @@ class Pipedrive * @var Organizations Object */ protected $organizations; + /** + * Placeholder attritube for the pipedrive organizationFields class + * @var \Benhawker\Pipedrive\Library\OrganizationFields OrganizationFields Object + */ + protected $organizationFields; /** * Placeholder attritube for the pipedrive products class * @var Products Object @@ -122,6 +127,7 @@ public function __construct($apiKey = '', $protocol = 'https', $host = 'api.pipe $this->notes = new Library\Notes($this); $this->dealFields = new Library\DealFields($this); $this->organizations = new Library\Organizations($this); + $this->organizationFields = new Library\OrganizationFields($this); $this->products = new Library\Products($this); } @@ -194,6 +200,16 @@ public function organizations() { return $this->organizations; } + + /** + * Returns the Pipedrive OrganizationFields Object + * + * @return \Benhawker\Pipedrive\Library\OrganizationFields + */ + public function organizationFields() + { + return $this->organizationFields; + } /** * Returns the Pipedrive Products Object