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){