- Update CRM Client

This commit is contained in:
Vincent BRIDIER 2021-05-17 17:50:50 +02:00
parent 69256faaeb
commit d6b85e435d

View file

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