Skip to content

Commit

Permalink
Added linkContacts method (#180)
Browse files Browse the repository at this point in the history
* Added linkContacts method

When viewing the Infusionsoft developer docs for linking contacts support, there seems to be no PHP support, while XML-RPC and Python do have support (see https://developer.infusionsoft.com/docs/xml-rpc/#contact-link-contacts). I noticed this while working on a project for a client when attempting to link a child contact with a parent contact. After researching, I found this method that I could add to the ContactService class (see this outdated post: https://community.infusionsoft.com/t/how-can-i-link-contacts-via-the-php-isdk/2935).

* Changed minor formatting error
  • Loading branch information
greggor88 authored and mfairch committed Jun 8, 2018
1 parent df0a530 commit f3cdade
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Infusionsoft/Api/ContactService.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,5 +152,16 @@ public function update($contactId, $data)
{
return $this->client->request('ContactService.update', $contactId, $data);
}

/**
* @param integer $contactId1
* @param integer $contactId2
* @param integer $linkId
* @return integer
*/
public function linkContacts($contactId1, $contactId2, $linkId)
{
return $this->client->request("ContactService.linkContacts", $contactId1, $contactId2, $linkId);
}

}
}

0 comments on commit f3cdade

Please sign in to comment.