Completed
Push — master ( 810155...7bbbc8 )
by Mr
02:02
created

Customer::allowed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 27

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 27
rs 9.488
c 0
b 0
f 0
cc 1
nc 1
nop 0
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