Completed
Push — master ( fc4efe...2a0cb3 )
by Mr
02:09
created

BookingRequest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 21
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A allowed() 0 14 1
1
<?php
2
3
namespace Resova\Models;
4
5
use Resova\Model;
6
7
/**
8
 * Class BookingRequest
9
 *
10
 * @package Resova\Models
11
 */
12
class BookingRequest extends Model
13
{
14
    /**
15
     * List of allowed fields
16
     *
17
     * @return array
18
     */
19
    public function allowed(): array
20
    {
21
        return [
22
            'instance_id'  => 'int', // The instance id for the date, item and time.
23
            // TODO: implement validation like "array of objects"
24
            'quantities'   => 'array[Quantity]', // The quantities of item pricing categories for this basket booking. Pass an array of objects.
25
            'booking_time' => 'string', // The custom start time of the booking, can result in the creation of a time adjustment or an error if that time is unvavailable .
26
            'booking_end'  => 'string', // The custom end time of the booking, can result in the creation of a time adjustment or an error if that time is unvavailable.
27
            'fee_exempt'   => 'string', // True if this basket booking is fee exempt.
28
            'tax_exempt'   => 'string', // True if this basket booking is tax exempt.
29
            // TODO: implement validation like "array of objects"
30
            'extras'       => 'array[Extra]', // The item extras for this basket booking. Pass an array of objects.
31
            // TODO: implement validation like "array of objects"
32
            'questions'    => 'array[Question]', // The item booking questions for this basket booking. Pass an array of objects.
33
        ];
34
    }
35
}
36