1 | <?php |
||
7 | class AirlineUpdate extends AbstractAirline |
||
8 | { |
||
9 | |||
10 | const UPDATE_TYPE_DELAY = 'delay'; |
||
11 | const UPDATE_TYPE_GATE_CHANGE = 'gate_change'; |
||
12 | const UPDATE_TYPE_CANCELLATION = 'cancellation'; |
||
13 | |||
14 | /** |
||
15 | * @var null|string |
||
16 | */ |
||
17 | protected $introMessage; |
||
18 | |||
19 | /** |
||
20 | * @var string |
||
21 | */ |
||
22 | protected $updateType; |
||
23 | |||
24 | /** |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $pnrNumber; |
||
28 | |||
29 | /** |
||
30 | * @var \Kerox\Messenger\Model\Message\Attachment\Template\Airline\FlightInfo |
||
31 | */ |
||
32 | protected $updateFlightInfo; |
||
33 | |||
34 | /** |
||
35 | * AirlineUpdate constructor. |
||
36 | * |
||
37 | * @param string $updateType |
||
38 | * @param string $locale |
||
39 | * @param string $pnrNumber |
||
40 | * @param \Kerox\Messenger\Model\Message\Attachment\Template\Airline\FlightInfo $updateFlightInfo |
||
41 | */ |
||
42 | public function __construct(string $updateType, string $locale, string $pnrNumber, FlightInfo $updateFlightInfo) |
||
52 | |||
53 | /** |
||
54 | * @param string $introMessage |
||
55 | * @return AirlineUpdate |
||
56 | */ |
||
57 | public function setIntroMessage($introMessage): AirlineUpdate |
||
63 | |||
64 | /** |
||
65 | * @param string $updateType |
||
66 | * @return void |
||
67 | * @throws \InvalidArgumentException |
||
68 | */ |
||
69 | private function isValidUpdateType(string $updateType) |
||
76 | |||
77 | /** |
||
78 | * @return array |
||
79 | */ |
||
80 | private function getAllowedUpdateType(): array |
||
88 | |||
89 | /** |
||
90 | * @return array |
||
91 | */ |
||
92 | public function jsonSerialize(): array |
||
110 | } |
||
111 |