1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Bookeo\Models; |
4
|
|
|
|
5
|
|
|
use Bookeo\Model; |
6
|
|
|
|
7
|
|
|
class Customer extends Model |
8
|
|
|
{ |
9
|
|
|
/** |
10
|
|
|
* List of allowed fields |
11
|
|
|
* |
12
|
|
|
* @codeCoverageIgnore |
13
|
|
|
* @return array |
14
|
|
|
*/ |
15
|
|
|
public function allowed(): array |
16
|
|
|
{ |
17
|
|
|
return [ |
18
|
|
|
'id' => 'string', // Globally unique ID that identifies this person |
19
|
|
|
'firstName' => 'string', |
20
|
|
|
'middleName' => 'string', |
21
|
|
|
'lastName' => 'string', |
22
|
|
|
'emailAddress' => 'string', |
23
|
|
|
'phoneNumbers' => 'array[PhoneNumber]', |
24
|
|
|
'streetAddress' => 'StreetAddress', |
25
|
|
|
'creationTime' => 'string:datetime', |
26
|
|
|
'startTimeOfNextBooking' => 'string:datetime', // The start time of the next booking. null if there are no bookings starting after 'now'. [read-only], |
27
|
|
|
'startTimeOfPreviousBooking' => 'string:datetime', // The start time of the last booking that occurred before 'now'. It is updated only after that booking's stop time [read-only], |
28
|
|
|
'dateOfBirth' => 'string:date', |
29
|
|
|
'customFields' => 'array[CustomField]', |
30
|
|
|
'gender' => 'string', // The gender of this person. = ['male' or 'female' or 'unknown'], |
31
|
|
|
'facebookId' => 'string', |
32
|
|
|
'credit' => 'Money', |
33
|
|
|
'languageCode' => 'string', // The language code that is preferred by the customer. It is set only if the customer has selected a specific language when creating or reviewing the booking, otherwise it is not set and the default language is assumed. The format is a modified version of the Internet standard rfc5646, replacing the - character (dash) with a _ character (underscore). Example: en_US, |
34
|
|
|
'acceptSmsReminders' => 'boolean', |
35
|
|
|
'numBookings' => 'integer', // Number of bookings that this customer has made |
36
|
|
|
'numCancelations' => 'integer', // Number of booking cancellations that were tracked for this customer |
37
|
|
|
'numNoShows' => 'integer', // Number of no-shows for this customer |
38
|
|
|
'member' => 'boolean', // Whether this customer is currently a member |
39
|
|
|
'membershipEnd' => 'date', // When the membership expires. If the membership is not set to expire, this field is not set. |
40
|
|
|
]; |
41
|
|
|
} |
42
|
|
|
} |
43
|
|
|
|