From f3cdadec414239494521e2827d32bdc15c4deae2 Mon Sep 17 00:00:00 2001 From: greggor88 Date: Fri, 8 Jun 2018 06:51:04 -0700 Subject: [PATCH] Added linkContacts method (#180) * 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 --- src/Infusionsoft/Api/ContactService.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/Infusionsoft/Api/ContactService.php b/src/Infusionsoft/Api/ContactService.php index 409c76a..8761062 100644 --- a/src/Infusionsoft/Api/ContactService.php +++ b/src/Infusionsoft/Api/ContactService.php @@ -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); + } -} \ No newline at end of file +}