From 7ab299fc906c7df3cd6ef7bf7f0b96ff39cc17aa Mon Sep 17 00:00:00 2001 From: Zdeno Kuzmany Date: Tue, 2 Mar 2021 10:56:35 +0100 Subject: [PATCH 1/2] Add sendCustomToContact --- lib/Api/Emails.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lib/Api/Emails.php b/lib/Api/Emails.php index c68e178a..bff02105 100644 --- a/lib/Api/Emails.php +++ b/lib/Api/Emails.php @@ -89,4 +89,17 @@ public function sendToLead($id, $leadId) { return $this->sendToContact($id, $leadId); } + + /** + * Send custom content to a specific contact. + * + * @param int $contactId + * @param array $data + * + * @return array|mixed + */ + public function sendCustomToContact($contactId, $data = []) + { + return $this->makeRequest($this->endpoint.'/contact/'.$contactId.'/send/custom', $data, 'POST'); + } } From 3154c38dd3caf68e2ea4311098446076e932d86c Mon Sep 17 00:00:00 2001 From: Zdeno Kuzmany Date: Tue, 2 Mar 2021 10:59:17 +0100 Subject: [PATCH 2/2] Add return type --- lib/Api/Emails.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Api/Emails.php b/lib/Api/Emails.php index bff02105..2ffd8be3 100644 --- a/lib/Api/Emails.php +++ b/lib/Api/Emails.php @@ -98,7 +98,7 @@ public function sendToLead($id, $leadId) * * @return array|mixed */ - public function sendCustomToContact($contactId, $data = []) + public function sendCustomToContact($contactId, $data = []): array { return $this->makeRequest($this->endpoint.'/contact/'.$contactId.'/send/custom', $data, 'POST'); }