1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Onfleet; |
4
|
|
|
|
5
|
|
|
/** |
6
|
|
|
* Class Organization |
7
|
|
|
* @package Onfleet |
8
|
|
|
*/ |
9
|
|
|
class Organization extends Entity |
10
|
|
|
{ |
11
|
|
|
protected $name; |
12
|
|
|
protected $email; |
13
|
|
|
protected $image; |
14
|
|
|
protected $timezone; |
15
|
|
|
protected $country; |
16
|
|
|
protected $timeCreated; |
17
|
|
|
protected $timeLastModified; |
18
|
|
|
protected $delegatees = []; |
19
|
|
|
|
20
|
|
|
protected $endpoint = 'organization'; |
21
|
|
|
|
22
|
|
|
protected static $properties = [ |
23
|
|
|
'id', |
24
|
|
|
'name', |
25
|
|
|
'email', |
26
|
|
|
'image', |
27
|
|
|
'timezone', |
28
|
|
|
'country', |
29
|
|
|
'timeCreated', |
30
|
|
|
'timeLastModified', |
31
|
|
|
'delegatees', |
32
|
|
|
]; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @return mixed |
36
|
|
|
*/ |
37
|
|
|
public function getName() |
38
|
|
|
{ |
39
|
|
|
return $this->name; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
/** |
43
|
|
|
* @param mixed $name |
44
|
|
|
*/ |
45
|
|
|
public function setName($name) |
46
|
|
|
{ |
47
|
|
|
$this->name = $name; |
48
|
|
|
} |
49
|
|
|
|
50
|
|
|
/** |
51
|
|
|
* @return mixed |
52
|
|
|
*/ |
53
|
|
|
public function getEmail() |
54
|
|
|
{ |
55
|
|
|
return $this->email; |
56
|
|
|
} |
57
|
|
|
|
58
|
|
|
/** |
59
|
|
|
* @param mixed $email |
60
|
|
|
*/ |
61
|
|
|
public function setEmail($email) |
62
|
|
|
{ |
63
|
|
|
$this->email = $email; |
64
|
|
|
} |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @return mixed |
68
|
|
|
*/ |
69
|
|
|
public function getImage() |
70
|
|
|
{ |
71
|
|
|
return $this->image; |
72
|
|
|
} |
73
|
|
|
|
74
|
|
|
/** |
75
|
|
|
* @param mixed $image |
76
|
|
|
*/ |
77
|
|
|
public function setImage($image) |
78
|
|
|
{ |
79
|
|
|
$this->image = $image; |
80
|
|
|
} |
81
|
|
|
|
82
|
|
|
/** |
83
|
|
|
* @return mixed |
84
|
|
|
*/ |
85
|
|
|
public function getTimezone() |
86
|
|
|
{ |
87
|
|
|
return $this->timezone; |
88
|
|
|
} |
89
|
|
|
|
90
|
|
|
/** |
91
|
|
|
* @param mixed $timezone |
92
|
|
|
*/ |
93
|
|
|
public function setTimezone($timezone) |
94
|
|
|
{ |
95
|
|
|
$this->timezone = $timezone; |
96
|
|
|
} |
97
|
|
|
|
98
|
|
|
/** |
99
|
|
|
* @return mixed |
100
|
|
|
*/ |
101
|
|
|
public function getCountry() |
102
|
|
|
{ |
103
|
|
|
return $this->country; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @param mixed $country |
108
|
|
|
*/ |
109
|
|
|
public function setCountry($country) |
110
|
|
|
{ |
111
|
|
|
$this->country = $country; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @return array |
116
|
|
|
*/ |
117
|
|
|
public function getDelegatees(): array |
118
|
|
|
{ |
119
|
|
|
return $this->delegatees; |
120
|
|
|
} |
121
|
|
|
|
122
|
|
|
/** |
123
|
|
|
* @param array $delegatees |
124
|
|
|
*/ |
125
|
|
|
public function setDelegatees(array $delegatees) |
126
|
|
|
{ |
127
|
|
|
$this->delegatees = $delegatees; |
128
|
|
|
} |
129
|
|
|
|
130
|
|
|
/** |
131
|
|
|
* @return mixed |
132
|
|
|
*/ |
133
|
|
|
public function getTimeCreated() |
134
|
|
|
{ |
135
|
|
|
return $this->timeCreated; |
136
|
|
|
} |
137
|
|
|
|
138
|
|
|
/** |
139
|
|
|
* @return mixed |
140
|
|
|
*/ |
141
|
|
|
public function getTimeLastModified() |
142
|
|
|
{ |
143
|
|
|
return $this->timeLastModified; |
144
|
|
|
} |
145
|
|
|
|
146
|
|
|
/** |
147
|
|
|
* @throws \BadMethodCallException |
148
|
|
|
*/ |
149
|
|
|
public function update() |
150
|
|
|
{ |
151
|
|
|
throw new \BadMethodCallException('Organization can not be updated'); |
152
|
|
|
} |
153
|
|
|
|
154
|
|
|
/** |
155
|
|
|
* @param array $metadata |
156
|
|
|
* @internal |
157
|
|
|
*/ |
158
|
|
|
public function setMetadata(array $metadata) |
159
|
|
|
{ |
160
|
|
|
throw new \BadMethodCallException('Organization does not support metadata'); |
161
|
|
|
} |
162
|
|
|
} |
163
|
|
|
|
164
|
|
|
|