Skip to content

Commit

Permalink
New methods available for Contacts and Deals
Browse files Browse the repository at this point in the history
  • Loading branch information
atomasevic committed Feb 5, 2019
1 parent 4b1598f commit d127dc3
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/contacts/Contacts.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}
45 changes: 45 additions & 0 deletions src/deals/Deals.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

}

0 comments on commit d127dc3

Please sign in to comment.