The Appointments parser must cast the ID values into integers.
This commit is contained in:
parent
f99d729830
commit
94d805f68a
1 changed files with 5 additions and 5 deletions
|
@ -16,16 +16,16 @@ namespace EA\Engine\Api\V1\Parsers;
|
||||||
class Appointments implements ParsersInterface {
|
class Appointments implements ParsersInterface {
|
||||||
public function encode(array &$response) {
|
public function encode(array &$response) {
|
||||||
$encodedResponse = [
|
$encodedResponse = [
|
||||||
'id' => $response['id'],
|
'id' => $response['id'] !== null ? (int)$response['id'] : null,
|
||||||
'book' => $response['book_datetime'],
|
'book' => $response['book_datetime'],
|
||||||
'start' => $response['start_datetime'],
|
'start' => $response['start_datetime'],
|
||||||
'end' => $response['end_datetime'],
|
'end' => $response['end_datetime'],
|
||||||
'hash' => $response['hash'],
|
'hash' => $response['hash'],
|
||||||
'notes' => $response['notes'],
|
'notes' => $response['notes'],
|
||||||
'customerId' => $response['id_users_customer'],
|
'customerId' => $response['id_users_customer'] !== null ? (int)$response['id_users_customer'] : null,
|
||||||
'providerId' => $response['id_users_provider'],
|
'providerId' => $response['id_users_provider'] !== null ? (int)$response['id_users_provider'] : null,
|
||||||
'serviceId' => $response['id_services'],
|
'serviceId' => $response['id_services'] !== null ? (int)$response['id_services'] : null,
|
||||||
'googleCalendarId' => $response['id_google_calendar']
|
'googleCalendarId' => $response['id_google_calendar'] !== null ? (int)$response['id_google_calendar'] : null
|
||||||
];
|
];
|
||||||
|
|
||||||
$response = $encodedResponse;
|
$response = $encodedResponse;
|
||||||
|
|
Loading…
Reference in a new issue