1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
declare(strict_types=1); |
4
|
|
|
|
5
|
|
|
namespace VasilDakov\Speedy\Model; |
6
|
|
|
|
7
|
|
|
use JMS\Serializer\Annotation as Serializer; |
8
|
|
|
|
9
|
|
|
/** |
10
|
|
|
* Class Parcel. |
11
|
|
|
* |
12
|
|
|
* @Serializer\AccessType("public_method") |
13
|
|
|
* |
14
|
|
|
* @author Valentin Valkanov <[email protected]> |
15
|
|
|
* @copyright |
16
|
|
|
* |
17
|
|
|
* @version |
18
|
|
|
*/ |
19
|
|
|
class Parcel |
20
|
|
|
{ |
21
|
|
|
/** |
22
|
|
|
* @Serializer\Type("string") |
23
|
|
|
*/ |
24
|
|
|
private string $id; |
25
|
|
|
|
26
|
|
|
/** |
27
|
|
|
* @Serializer\Type("int") |
28
|
|
|
*/ |
29
|
|
|
private int $seqNo; |
30
|
|
|
|
31
|
|
|
/** |
32
|
|
|
* @Serializer\Type("int") |
33
|
|
|
*/ |
34
|
|
|
private int $packageUniqueNumber; |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Model\Size") |
38
|
|
|
*/ |
39
|
|
|
private Size $declaredSize; |
40
|
|
|
|
41
|
|
|
/** |
42
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Model\Size") |
43
|
|
|
*/ |
44
|
|
|
private Size $measuredSize; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @Serializer\Type("VasilDakov\Speedy\Model\Size") |
48
|
|
|
*/ |
49
|
|
|
private Size $calculationSize; |
50
|
|
|
|
51
|
|
|
/** |
52
|
|
|
* @Serializer\Type("float") |
53
|
|
|
*/ |
54
|
|
|
private float $declaredWeight; |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* @Serializer\Type("float") |
58
|
|
|
*/ |
59
|
|
|
private float $measuredWeight; |
60
|
|
|
|
61
|
|
|
/** |
62
|
|
|
* @Serializer\Type("float") |
63
|
|
|
*/ |
64
|
|
|
private float $calculationWeight; |
65
|
|
|
|
66
|
|
|
/** |
67
|
|
|
* @Serializer\Type("string") |
68
|
|
|
*/ |
69
|
|
|
private string $externalCarrierParcelNumber; |
70
|
|
|
|
71
|
|
|
/** |
72
|
|
|
* @Serializer\Type("string") |
73
|
|
|
*/ |
74
|
|
|
private string $baseType; |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @Serializer\Type("string") |
78
|
|
|
*/ |
79
|
|
|
private string $size; |
80
|
|
|
|
81
|
1 |
|
public function getId(): string |
82
|
|
|
{ |
83
|
1 |
|
return $this->id; |
84
|
|
|
} |
85
|
|
|
|
86
|
2 |
|
public function setId(string $id): void |
87
|
|
|
{ |
88
|
2 |
|
$this->id = $id; |
89
|
|
|
} |
90
|
|
|
|
91
|
|
|
public function getSeqNo(): int |
92
|
|
|
{ |
93
|
|
|
return $this->seqNo; |
94
|
|
|
} |
95
|
|
|
|
96
|
2 |
|
public function setSeqNo(int $seqNo): void |
97
|
|
|
{ |
98
|
2 |
|
$this->seqNo = $seqNo; |
99
|
|
|
} |
100
|
|
|
|
101
|
|
|
public function getPackageUniqueNumber(): int |
102
|
|
|
{ |
103
|
|
|
return $this->packageUniqueNumber; |
104
|
|
|
} |
105
|
|
|
|
106
|
2 |
|
public function setPackageUniqueNumber(int $packageUniqueNumber): void |
107
|
|
|
{ |
108
|
2 |
|
$this->packageUniqueNumber = $packageUniqueNumber; |
109
|
|
|
} |
110
|
|
|
|
111
|
2 |
|
public function setDeclaredSize(Size $declaredSize): void |
112
|
|
|
{ |
113
|
2 |
|
$this->declaredSize = $declaredSize; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
public function getDeclaredSize(): Size |
117
|
|
|
{ |
118
|
|
|
return $this->declaredSize; |
119
|
|
|
} |
120
|
|
|
|
121
|
|
|
public function getMeasuredSize(): Size |
122
|
|
|
{ |
123
|
|
|
return $this->measuredSize; |
124
|
|
|
} |
125
|
|
|
|
126
|
1 |
|
public function setMeasuredSize(Size $measuredSize): void |
127
|
|
|
{ |
128
|
1 |
|
$this->measuredSize = $measuredSize; |
129
|
|
|
} |
130
|
|
|
|
131
|
|
|
public function getCalculationSize(): Size |
132
|
|
|
{ |
133
|
|
|
return $this->calculationSize; |
134
|
|
|
} |
135
|
|
|
|
136
|
1 |
|
public function setCalculationSize(Size $calculationSize): void |
137
|
|
|
{ |
138
|
1 |
|
$this->calculationSize = $calculationSize; |
139
|
|
|
} |
140
|
|
|
|
141
|
|
|
public function getDeclaredWeight(): float |
142
|
|
|
{ |
143
|
|
|
return $this->declaredWeight; |
144
|
|
|
} |
145
|
|
|
|
146
|
1 |
|
public function setDeclaredWeight(float $declaredWeight): void |
147
|
|
|
{ |
148
|
1 |
|
$this->declaredWeight = $declaredWeight; |
149
|
|
|
} |
150
|
|
|
|
151
|
|
|
public function getMeasuredWeight(): float |
152
|
|
|
{ |
153
|
|
|
return $this->measuredWeight; |
154
|
|
|
} |
155
|
|
|
|
156
|
1 |
|
public function setMeasuredWeight(float $measuredWeight): void |
157
|
|
|
{ |
158
|
1 |
|
$this->measuredWeight = $measuredWeight; |
159
|
|
|
} |
160
|
|
|
|
161
|
|
|
public function getCalculationWeight(): float |
162
|
|
|
{ |
163
|
|
|
return $this->calculationWeight; |
164
|
|
|
} |
165
|
|
|
|
166
|
1 |
|
public function setCalculationWeight(float $calculationWeight): void |
167
|
|
|
{ |
168
|
1 |
|
$this->calculationWeight = $calculationWeight; |
169
|
|
|
} |
170
|
|
|
|
171
|
|
|
public function getExternalCarrierParcelNumber(): string |
172
|
|
|
{ |
173
|
|
|
return $this->externalCarrierParcelNumber; |
174
|
|
|
} |
175
|
|
|
|
176
|
1 |
|
public function setExternalCarrierParcelNumber(string $externalCarrierParcelNumber): void |
177
|
|
|
{ |
178
|
1 |
|
$this->externalCarrierParcelNumber = $externalCarrierParcelNumber; |
179
|
|
|
} |
180
|
|
|
|
181
|
|
|
public function getBaseType(): string |
182
|
|
|
{ |
183
|
|
|
return $this->baseType; |
184
|
|
|
} |
185
|
|
|
|
186
|
1 |
|
public function setBaseType(string $baseType): void |
187
|
|
|
{ |
188
|
1 |
|
$this->baseType = $baseType; |
189
|
|
|
} |
190
|
|
|
|
191
|
|
|
public function getSize(): string |
192
|
|
|
{ |
193
|
|
|
return $this->size; |
194
|
|
|
} |
195
|
|
|
|
196
|
2 |
|
public function setSize(string $size): void |
197
|
|
|
{ |
198
|
2 |
|
$this->size = $size; |
199
|
|
|
} |
200
|
|
|
|
201
|
1 |
|
public function toArray(): array |
202
|
|
|
{ |
203
|
1 |
|
return []; |
204
|
|
|
} |
205
|
|
|
} |
206
|
|
|
|