Skip to content

Commit d127dc3

Browse files
committed
New methods available for Contacts and Deals
1 parent 4b1598f commit d127dc3

File tree

2 files changed

+60
-0
lines changed

2 files changed

+60
-0
lines changed

src/contacts/Contacts.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,4 +305,19 @@ public function deleteCustomFieldValue(int $field_value_id)
305305
return 200 === $req->getStatusCode();
306306
}
307307

308+
/**
309+
* Remove contact from automation
310+
* @see https://developers.activecampaign.com/reference#delete-a-contactautomation
311+
* @param int $contactAutomationId
312+
* @return bool
313+
*/
314+
public function removeAutomation(int $contactAutomationId)
315+
{
316+
$req = $this->client
317+
->getClient()
318+
->delete('/api/3/contactAutomation/' . $contactAutomationId);
319+
320+
return 200 === $req->getStatusCode();
321+
}
322+
308323
}

src/deals/Deals.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,4 +201,49 @@ public function listAllCustomFields()
201201
return $req->getBody()->getContents();
202202
}
203203

204+
/**
205+
* List all custom field values
206+
* @see https://developers.activecampaign.com/reference#list-all-custom-field-values
207+
* @param array $query_params
208+
* @return string
209+
*/
210+
public function listAllCustomFieldValues(array $query_params)
211+
{
212+
$req = $this->client
213+
->getClient()
214+
->get('/api/3/dealCustomFieldData', [
215+
'query' => $query_params
216+
]);
217+
218+
return $req->getBody()->getContents();
219+
}
220+
221+
/**
222+
* List all pipelines
223+
* @see https://developers.activecampaign.com/reference#list-all-pipelines
224+
* @return string
225+
*/
226+
public function listAllPipelines()
227+
{
228+
$req = $this->client
229+
->getClient()
230+
->get('/api/3/dealGroups');
231+
232+
return $req->getBody()->getContents();
233+
}
234+
235+
/**
236+
* List all stages
237+
* @see https://developers.activecampaign.com/reference#list-all-deal-stages
238+
* @return string
239+
*/
240+
public function listAllStages()
241+
{
242+
$req = $this->client
243+
->getClient()
244+
->get('/api/3/dealStages');
245+
246+
return $req->getBody()->getContents();
247+
}
248+
204249
}

0 commit comments

Comments
 (0)