Add missing timezone and language props in API

This commit is contained in:
Alex Tselegidis 2024-06-18 10:18:56 +02:00
parent f398d18bbc
commit 88b8f87f97

View file

@ -457,6 +457,7 @@ class Customers_model extends EA_Model
'zip' => $customer['zip_code'], 'zip' => $customer['zip_code'],
'notes' => $customer['notes'], 'notes' => $customer['notes'],
'timezone' => $customer['timezone'], 'timezone' => $customer['timezone'],
'language' => $customer['language'],
'customField1' => $customer['custom_field_1'], 'customField1' => $customer['custom_field_1'],
'customField2' => $customer['custom_field_2'], 'customField2' => $customer['custom_field_2'],
'customField3' => $customer['custom_field_3'], 'customField3' => $customer['custom_field_3'],
@ -514,6 +515,10 @@ class Customers_model extends EA_Model
$decoded_resource['language'] = $customer['language']; $decoded_resource['language'] = $customer['language'];
} }
if (array_key_exists('timezone', $customer)) {
$decoded_resource['timezone'] = $customer['timezone'];
}
if (array_key_exists('customField1', $customer)) { if (array_key_exists('customField1', $customer)) {
$decoded_resource['custom_field_1'] = $customer['customField1']; $decoded_resource['custom_field_1'] = $customer['customField1'];
} }