1 | <?php |
||
15 | final class Shipping implements CreatableFromArray |
||
16 | { |
||
17 | /** |
||
18 | * @var Address |
||
19 | */ |
||
20 | private $address; |
||
21 | |||
22 | /** |
||
23 | * @var ?string |
||
24 | */ |
||
25 | private $carrier; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $name; |
||
31 | |||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | private $phone; |
||
36 | |||
37 | /** |
||
38 | * @var ?string |
||
39 | */ |
||
40 | private $trackingNumber; |
||
41 | |||
42 | private function __construct() |
||
45 | |||
46 | public static function createFromArray(array $data): self |
||
57 | |||
58 | public function getAddress(): Address |
||
62 | |||
63 | public function getCarrier(): ?string |
||
67 | |||
68 | public function getName(): ?string |
||
72 | |||
73 | public function getPhone(): ?string |
||
77 | |||
78 | public function getTrackingNumber(): ?string |
||
82 | } |
||
83 |