diff --git a/composer.json b/composer.json index c6187e3..7039549 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,20 @@ "keywords": ["crm", "api"], "homepage": "", "license": "MIT", - "authors": [{"name": "TTRide Group Devs", "email": "ben@tickettoridegroup.com", "homepage": "http://tickettoridegroup.com", "role": "Developer"}], + "authors": [ + { + "name": "TTRide Group Devs", + "email": "ben@tickettoridegroup.com", + "homepage": "http://tickettoridegroup.com", + "role": "Developer" + }, + { + "name": "Thomas Fauré", + "email": "thomas.faure@whaller.com", + "homepage": "https://whaller.com", + "role": "CEO" + } + ], "require": { "php": ">=5.3.0" }, diff --git a/src/Benhawker/Pipedrive/Library/OrganizationFields.php b/src/Benhawker/Pipedrive/Library/OrganizationFields.php new file mode 100644 index 0000000..aa3d694 --- /dev/null +++ b/src/Benhawker/Pipedrive/Library/OrganizationFields.php @@ -0,0 +1,48 @@ +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/Library/PersonFields.php b/src/Benhawker/Pipedrive/Library/PersonFields.php new file mode 100644 index 0000000..319209a --- /dev/null +++ b/src/Benhawker/Pipedrive/Library/PersonFields.php @@ -0,0 +1,48 @@ +curl = $master->curl(); + } + + /** + * Returns all person fields + * + * @return array returns all personFields + */ + public function getAll() + { + return $this->curl->get('personFields'); + } + + /** + * Returns a person field + * + * @param int $id pipedrive personField id + * @return array returns details of a personField + */ + public function getById($id) + { + return $this->curl->get('personFields/' . $id); + } +} diff --git a/src/Benhawker/Pipedrive/Pipedrive.php b/src/Benhawker/Pipedrive/Pipedrive.php index 1fe7b18..815e4e6 100644 --- a/src/Benhawker/Pipedrive/Pipedrive.php +++ b/src/Benhawker/Pipedrive/Pipedrive.php @@ -1,9 +1,10 @@ curl = new Library\Curl($url, $apiKey); //add pipedrive classes to the assoicated property - $this->persons = new Library\Persons($this); - $this->deals = new Library\Deals($this); - $this->activities = new Library\Activities($this); - $this->notes = new Library\Notes($this); - $this->dealFields = new Library\DealFields($this); - $this->organizations = new Library\Organizations($this); - $this->products = new Library\Products($this); + $this->persons = new Library\Persons($this); + $this->deals = new Library\Deals($this); + $this->activities = new Library\Activities($this); + $this->notes = new Library\Notes($this); + $this->dealFields = new Library\DealFields($this); + $this->personFields = new Library\PersonFields($this); + $this->organizationFields = new Library\OrganizationFields($this); + $this->organizations = new Library\Organizations($this); + $this->products = new Library\Products($this); } /** @@ -185,6 +198,26 @@ public function dealFields() return $this->dealFields; } + /** + * Returns the Pipedrive PersonFields Object + * + * @return \Benhawker\Pipedrive\Library\PersonFields + */ + public function personFields() + { + return $this->personFields; + } + + /** + * Returns the Pipedrive OrganizationFields Object + * + * @return \Benhawker\Pipedrive\Library\OrganizationFields + */ + public function organizationFields() + { + return $this->organizationFields; + } + /** * Returns the Pipedrive Organizations Object *