From d6b85e435d9e0ea36f56c440bdcac72a31e38c7f Mon Sep 17 00:00:00 2001 From: Vincent BRIDIER Date: Mon, 17 May 2021 17:50:50 +0200 Subject: [PATCH] - Update CRM Client --- clients/LDCCRM_V1.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/clients/LDCCRM_V1.php b/clients/LDCCRM_V1.php index 6e1959d..54a351d 100644 --- a/clients/LDCCRM_V1.php +++ b/clients/LDCCRM_V1.php @@ -104,8 +104,12 @@ class ApiV1 return $this->callAPI('POST', '/single-optin', ['email' => $email]); } - public function ArcadiaOutgoingMail($crm_id, $fields, $type){ - return $this->callAPI('POST', '/arcadia/outgoing-mail', ['crm_id' => $crm_id, 'fields' => json_encode($fields), 'type' => $type]); + public function ArcadiaOutgoingMail($crm_id, $fields, $type, $shipping = false){ + if ($shipping !== false && $type === 'default') { + return $this->callAPI('POST', '/arcadia/outgoing-mail', ['crm_id' => $crm_id, 'fields' => json_encode($fields), 'type' => $type, 'shipping' => json_encode($shipping)]); + }else{ + return $this->callAPI('POST', '/arcadia/outgoing-mail', ['crm_id' => $crm_id, 'fields' => json_encode($fields), 'type' => $type]); + } } private function callAPI($method, $url, $data = false){