PluginProbe
Packeta / 2.1
Packeta v2.1
2.3.2 2.3.1 trunk 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.3.0 1.3.1 1.3.2 1.4 1.4.1 1.4.2 1.4.3 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.6.0 1.6.1 1.6.2 1.6.3 1.6.4 All 56 releases
packeta / src / Packetery / Core / Entity / CustomsDeclarationItem.php

CustomsDeclarationItem.php in Packeta 2.1, at src/Packetery/Core/Entity/CustomsDeclarationItem.php

262 lines 3.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Class CustomsDeclarationItem
4 *
5 * @package Packetery
6 */
7
8 declare(strict_types=1);
9
10 namespace Packetery\Core\Entity;
11
12 /**
13 * Class CustomsDeclarationItem
14 */
15 class CustomsDeclarationItem {
16
17 /**
18 * ID.
19 *
20 * @var string|null
21 */
22 private $id;
23
24 /**
25 * Customs declaration.
26 *
27 * @var string
28 */
29 private $customsDeclarationId;
30
31 /**
32 * Code.
33 *
34 * @var string
35 */
36 private $customsCode;
37
38 /**
39 * Value.
40 *
41 * @var float
42 */
43 private $value;
44
45 /**
46 * Product name in english.
47 *
48 * @var string
49 */
50 private $productNameEn;
51
52 /**
53 * Product name.
54 *
55 * @var string|null
56 */
57 private $productName;
58
59 /**
60 * Amount.
61 *
62 * @var int
63 */
64 private $unitsCount;
65
66 /**
67 * Country code.
68 *
69 * @var string
70 */
71 private $countryOfOrigin;
72
73 /**
74 * Weight.
75 *
76 * @var float
77 */
78 private $weight;
79
80 /**
81 * Tells if contains food or book.
82 *
83 * @var bool
84 */
85 private $isFoodOrBook;
86
87 /**
88 * Tells if contains VOC.
89 *
90 * @var bool
91 */
92 private $isVoc;
93
94 /**
95 * Constructor.
96 *
97 * @param string $customsDeclarationId Customs declaration.
98 * @param string $customsCode Code.
99 * @param float $value Value.
100 * @param string $productNameEn Product name in english.
101 * @param int $unitsCount Amount.
102 * @param string $countryOfOrigin Country of origin.
103 * @param float $weight Weight.
104 */
105 public function __construct(
106 string $customsDeclarationId,
107 string $customsCode,
108 float $value,
109 string $productNameEn,
110 int $unitsCount,
111 string $countryOfOrigin,
112 float $weight
113 ) {
114 $this->customsDeclarationId = $customsDeclarationId;
115 $this->customsCode = $customsCode;
116 $this->value = $value;
117 $this->productNameEn = $productNameEn;
118 $this->unitsCount = $unitsCount;
119 $this->countryOfOrigin = $countryOfOrigin;
120 $this->weight = $weight;
121 }
122
123 /**
124 * Country of origin.
125 *
126 * @return string
127 */
128 public function getCountryOfOrigin(): string {
129 return $this->countryOfOrigin;
130 }
131
132 /**
133 * Customs code.
134 *
135 * @return string
136 */
137 public function getCustomsCode(): string {
138 return $this->customsCode;
139 }
140
141 /**
142 * Gets customs declaration.
143 *
144 * @return string
145 */
146 public function getCustomsDeclarationId(): string {
147 return $this->customsDeclarationId;
148 }
149
150 /**
151 * Gets ID.
152 *
153 * @return string|null
154 */
155 public function getId(): ?string {
156 return $this->id;
157 }
158
159 /**
160 * Sets ID.
161 *
162 * @param string|null $id ID.
163 * @return void
164 */
165 public function setId( ?string $id ): void {
166 $this->id = $id;
167 }
168
169 /**
170 * Gets product name.
171 *
172 * @return string|null
173 */
174 public function getProductName(): ?string {
175 return $this->productName;
176 }
177
178 /**
179 * Sets product name.
180 *
181 * @param string|null $productName Product name.
182 * @return void
183 */
184 public function setProductName( ?string $productName ): void {
185 $this->productName = $productName;
186 }
187
188 /**
189 * Product name english.
190 *
191 * @return string
192 */
193 public function getProductNameEn(): string {
194 return $this->productNameEn;
195 }
196
197 /**
198 * Amount.
199 *
200 * @return int
201 */
202 public function getUnitsCount(): int {
203 return $this->unitsCount;
204 }
205
206 /**
207 * Gets value.
208 *
209 * @return float
210 */
211 public function getValue(): float {
212 return $this->value;
213 }
214
215 /**
216 * Gets weight.
217 *
218 * @return float
219 */
220 public function getWeight(): float {
221 return $this->weight;
222 }
223
224 /**
225 * Tells if it contains food or book.
226 *
227 * @return bool
228 */
229 public function isFoodOrBook(): bool {
230 return $this->isFoodOrBook;
231 }
232
233 /**
234 * Sets book or food flag.
235 *
236 * @param bool $isFoodOrBook Food or book.
237 * @return void
238 */
239 public function setIsFoodOrBook( bool $isFoodOrBook ): void {
240 $this->isFoodOrBook = $isFoodOrBook;
241 }
242
243 /**
244 * Tells if it contains VOC.
245 *
246 * @return bool
247 */
248 public function isVoc(): bool {
249 return $this->isVoc;
250 }
251
252 /**
253 * Sets VOC flag.
254 *
255 * @param bool $isVoc VOC.
256 * @return void
257 */
258 public function setIsVoc( bool $isVoc ): void {
259 $this->isVoc = $isVoc;
260 }
261 }
262