1 | <?php |
||
15 | class BpostPackage |
||
16 | { |
||
17 | const BPOST_API_ENDPOINT = 'http://track.bpost.be/btr/api/'; |
||
18 | const LANGUAGE = 'nl'; // nl, en, fr |
||
19 | |||
20 | // Pakcage information |
||
21 | private $statusUpdates = array(); |
||
22 | private $itemNumber; |
||
23 | private $weight; |
||
24 | private $customerReference; |
||
25 | private $requestedDeliveryMethod; |
||
26 | |||
27 | /** @var SenderReceiver $sender */ |
||
28 | private $sender; |
||
29 | |||
30 | /** @var SenderReceiver $receiver */ |
||
31 | private $receiver; |
||
32 | |||
33 | private $translationsCache = null; |
||
34 | |||
35 | |||
36 | public function __construct($itemNumber) |
||
42 | |||
43 | private function fetchTranslations() |
||
54 | |||
55 | private function translateKey($key) |
||
63 | |||
64 | private function getTrackingInformation() |
||
102 | |||
103 | /** |
||
104 | * @return mixed |
||
105 | */ |
||
106 | public function getItemNumber() |
||
110 | |||
111 | /** |
||
112 | * @return array |
||
113 | */ |
||
114 | public function getStatusUpdates() |
||
118 | |||
119 | /** |
||
120 | * @return mixed |
||
121 | */ |
||
122 | public function getWeight() |
||
126 | |||
127 | /** |
||
128 | * @return mixed |
||
129 | */ |
||
130 | public function getCustomerReference() |
||
134 | |||
135 | /** |
||
136 | * @return mixed |
||
137 | */ |
||
138 | public function getRequestedDeliveryMethod() |
||
142 | |||
143 | /** |
||
144 | * @return SenderReceiver |
||
145 | */ |
||
146 | public function getSender() |
||
150 | |||
151 | /** |
||
152 | * @return SenderReceiver |
||
153 | */ |
||
154 | public function getReceiver() |
||
158 | |||
159 | private function setItemNumber($itemNumber) |
||
163 | } |