1 | <?php |
||
7 | class DeliveryOption implements DeliveryOptionInterface |
||
8 | { |
||
9 | /** |
||
10 | * Delivery's service type. |
||
11 | * |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $service; |
||
15 | |||
16 | /** |
||
17 | * Delivery's type. |
||
18 | * |
||
19 | * @var string |
||
20 | */ |
||
21 | protected $type; |
||
22 | |||
23 | /** |
||
24 | * Delivery's tariff. |
||
25 | * |
||
26 | * @var int|float |
||
27 | */ |
||
28 | protected $tariff; |
||
29 | |||
30 | /** |
||
31 | * Delivery's estimated days. |
||
32 | * |
||
33 | * @var string|null |
||
34 | */ |
||
35 | protected $estimatedDays; |
||
36 | |||
37 | /** |
||
38 | * Create a new instance of delivery. |
||
39 | * |
||
40 | * @param string $service |
||
41 | * @param string $type |
||
42 | * @param int|float $tariff |
||
43 | * @param string|null $estimatedDays |
||
44 | */ |
||
45 | 6 | public function __construct($service, $type, $tariff, $estimatedDays = null) |
|
52 | |||
53 | /** |
||
54 | * Get delivery's service. |
||
55 | * |
||
56 | * @return string |
||
57 | */ |
||
58 | 2 | public function service() |
|
62 | |||
63 | /** |
||
64 | * Get delivery's type. |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 2 | public function type() |
|
72 | |||
73 | /** |
||
74 | * Get delivery's tariff. |
||
75 | * |
||
76 | * @return int|float |
||
77 | */ |
||
78 | 2 | public function tariff() |
|
82 | |||
83 | /** |
||
84 | * Get delivery's estimated days. |
||
85 | * |
||
86 | * @return string|null |
||
87 | */ |
||
88 | 2 | public function estimatedDays() |
|
92 | } |
||
93 |