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

CustomField::required()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
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
/**
8
 * Class CustomField
9
 *
10
 * @codeCoverageIgnore
11
 * @package Bookeo\Models
12
 */
13
class CustomField extends Model
14
{
15
    /**
16
     * List of allowed fields
17
     *
18
     * @return array
19
     */
20
    public function allowed(): array
21
    {
22
        return [
23
            'id'    => 'string', // The id of the field. It must match the id of an existing customer custom field, as returned by a call to GET /settings/customercustomfields When creating or updating a customer, either the id or the name property are required. If both are supplied, Bookeo will only consider the id property.,
24
            'name'  => 'string', // The name of the field. It must match the name of an existing customer custom field, as returned by a call to GET /settings/customercustomfields When creating or updating a customer, either the id or the name property are required. If both are supplied, Bookeo will only consider the id property.,
25
            'value' => 'string', // The value of the field. For checkbox-type options, possible values are "true" and "false" For choice fields, this is the name (i.e. plain text) of the chosen value, not the id
26
        ];
27
    }
28
29
    /**
30
     * List of required fields
31
     *
32
     * @return array
33
     */
34
    public function required(): array
35
    {
36
        return [
37
            'value'
38
        ];
39
    }
40
}
41