diff --git a/src/contacts/Contacts.php b/src/contacts/Contacts.php index 9d3c867..977a1bb 100644 --- a/src/contacts/Contacts.php +++ b/src/contacts/Contacts.php @@ -305,4 +305,19 @@ public function deleteCustomFieldValue(int $field_value_id) return 200 === $req->getStatusCode(); } + /** + * Remove contact from automation + * @see https://developers.activecampaign.com/reference#delete-a-contactautomation + * @param int $contactAutomationId + * @return bool + */ + public function removeAutomation(int $contactAutomationId) + { + $req = $this->client + ->getClient() + ->delete('/api/3/contactAutomation/' . $contactAutomationId); + + return 200 === $req->getStatusCode(); + } + } \ No newline at end of file diff --git a/src/deals/Deals.php b/src/deals/Deals.php index 9349724..6830e13 100644 --- a/src/deals/Deals.php +++ b/src/deals/Deals.php @@ -201,4 +201,49 @@ public function listAllCustomFields() return $req->getBody()->getContents(); } + /** + * List all custom field values + * @see https://developers.activecampaign.com/reference#list-all-custom-field-values + * @param array $query_params + * @return string + */ + public function listAllCustomFieldValues(array $query_params) + { + $req = $this->client + ->getClient() + ->get('/api/3/dealCustomFieldData', [ + 'query' => $query_params + ]); + + return $req->getBody()->getContents(); + } + + /** + * List all pipelines + * @see https://developers.activecampaign.com/reference#list-all-pipelines + * @return string + */ + public function listAllPipelines() + { + $req = $this->client + ->getClient() + ->get('/api/3/dealGroups'); + + return $req->getBody()->getContents(); + } + + /** + * List all stages + * @see https://developers.activecampaign.com/reference#list-all-deal-stages + * @return string + */ + public function listAllStages() + { + $req = $this->client + ->getClient() + ->get('/api/3/dealStages'); + + return $req->getBody()->getContents(); + } + } \ No newline at end of file