|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
namespace Lamoda\IsmpClient\V4\Dto\FacadeDocBodyResponse; |
|
6
|
|
|
|
|
7
|
|
|
use Lamoda\IsmpClient\V4\Dto\FacadeDocBodyResponse\Body\DocumentDescription; |
|
8
|
|
|
use Lamoda\IsmpClient\V4\Dto\FacadeDocBodyResponse\Body\Products\Product; |
|
9
|
|
|
|
|
10
|
|
|
class Body |
|
11
|
|
|
{ |
|
12
|
|
|
/** |
|
13
|
|
|
* @var string|null |
|
14
|
|
|
*/ |
|
15
|
|
|
private $originalString; |
|
16
|
|
|
/** |
|
17
|
|
|
* @var string|null |
|
18
|
|
|
*/ |
|
19
|
|
|
private $regDate; |
|
20
|
|
|
/** |
|
21
|
|
|
* @var DocumentDescription|null |
|
22
|
|
|
*/ |
|
23
|
|
|
private $documentDescription; |
|
24
|
|
|
/** |
|
25
|
|
|
* @var string|null |
|
26
|
|
|
*/ |
|
27
|
|
|
private $docType; |
|
28
|
|
|
/** |
|
29
|
|
|
* @var string|null |
|
30
|
|
|
*/ |
|
31
|
|
|
private $receiver; |
|
32
|
|
|
/** |
|
33
|
|
|
* @var string|null |
|
34
|
|
|
*/ |
|
35
|
|
|
private $docId; |
|
36
|
|
|
/** |
|
37
|
|
|
* @var Product[] |
|
38
|
|
|
*/ |
|
39
|
|
|
private $products = []; |
|
40
|
|
|
/** |
|
41
|
|
|
* @var Product[] |
|
42
|
|
|
*/ |
|
43
|
|
|
private $productsList = []; |
|
44
|
|
|
/** |
|
45
|
|
|
* @var string|null |
|
46
|
|
|
*/ |
|
47
|
|
|
private $turnoverType; |
|
48
|
|
|
/** |
|
49
|
|
|
* @var string|null |
|
50
|
|
|
*/ |
|
51
|
|
|
private $documentNum; |
|
52
|
|
|
/** |
|
53
|
|
|
* @var string|null |
|
54
|
|
|
*/ |
|
55
|
|
|
private $documentDate; |
|
56
|
|
|
/** |
|
57
|
|
|
* @var string|null |
|
58
|
|
|
*/ |
|
59
|
|
|
private $sale; |
|
60
|
|
|
/** |
|
61
|
|
|
* @var string|null |
|
62
|
|
|
*/ |
|
63
|
|
|
private $withdrawalFromTurnover; |
|
64
|
|
|
/** |
|
65
|
|
|
* @var string|null |
|
66
|
|
|
*/ |
|
67
|
|
|
private $transferDate; |
|
68
|
|
|
/** |
|
69
|
|
|
* @var string|null |
|
70
|
|
|
*/ |
|
71
|
|
|
private $receiverInn; |
|
72
|
|
|
/** |
|
73
|
|
|
* @var string|null |
|
74
|
|
|
*/ |
|
75
|
|
|
private $ownerInn; |
|
76
|
|
|
|
|
77
|
|
|
public function getOriginalString(): ?string |
|
78
|
|
|
{ |
|
79
|
|
|
return $this->originalString; |
|
80
|
|
|
} |
|
81
|
|
|
|
|
82
|
|
|
public function setOriginalString(?string $originalString): self |
|
83
|
|
|
{ |
|
84
|
|
|
$this->originalString = $originalString; |
|
85
|
|
|
|
|
86
|
|
|
return $this; |
|
87
|
|
|
} |
|
88
|
|
|
|
|
89
|
|
|
public function getRegDate(): ?string |
|
90
|
|
|
{ |
|
91
|
|
|
return $this->regDate; |
|
92
|
|
|
} |
|
93
|
|
|
|
|
94
|
|
|
public function setRegDate(?string $regDate): self |
|
95
|
|
|
{ |
|
96
|
|
|
$this->regDate = $regDate; |
|
97
|
|
|
|
|
98
|
|
|
return $this; |
|
99
|
|
|
} |
|
100
|
|
|
|
|
101
|
|
|
public function getDocumentDescription(): ?DocumentDescription |
|
102
|
|
|
{ |
|
103
|
|
|
return $this->documentDescription; |
|
104
|
|
|
} |
|
105
|
|
|
|
|
106
|
|
|
public function setDocumentDescription(?DocumentDescription $documentDescription): self |
|
107
|
|
|
{ |
|
108
|
|
|
$this->documentDescription = $documentDescription; |
|
109
|
|
|
|
|
110
|
|
|
return $this; |
|
111
|
|
|
} |
|
112
|
|
|
|
|
113
|
|
|
public function getDocType(): ?string |
|
114
|
|
|
{ |
|
115
|
|
|
return $this->docType; |
|
116
|
|
|
} |
|
117
|
|
|
|
|
118
|
|
|
public function setDocType(?string $docType): self |
|
119
|
|
|
{ |
|
120
|
|
|
$this->docType = $docType; |
|
121
|
|
|
|
|
122
|
|
|
return $this; |
|
123
|
|
|
} |
|
124
|
|
|
|
|
125
|
|
|
public function getReceiver(): ?string |
|
126
|
|
|
{ |
|
127
|
|
|
return $this->receiver; |
|
128
|
|
|
} |
|
129
|
|
|
|
|
130
|
|
|
public function setReceiver(?string $receiver): self |
|
131
|
|
|
{ |
|
132
|
|
|
$this->receiver = $receiver; |
|
133
|
|
|
|
|
134
|
|
|
return $this; |
|
135
|
|
|
} |
|
136
|
|
|
|
|
137
|
|
|
public function getDocId(): ?string |
|
138
|
|
|
{ |
|
139
|
|
|
return $this->docId; |
|
140
|
|
|
} |
|
141
|
|
|
|
|
142
|
|
|
public function setDocId(?string $docId): self |
|
143
|
|
|
{ |
|
144
|
|
|
$this->docId = $docId; |
|
145
|
|
|
|
|
146
|
|
|
return $this; |
|
147
|
|
|
} |
|
148
|
|
|
|
|
149
|
|
|
/** |
|
150
|
|
|
* @return Product[] |
|
151
|
|
|
*/ |
|
152
|
|
|
public function getProducts(): array |
|
153
|
|
|
{ |
|
154
|
|
|
return $this->products; |
|
155
|
|
|
} |
|
156
|
|
|
|
|
157
|
|
|
public function setProducts(array $products): self |
|
158
|
|
|
{ |
|
159
|
|
|
$this->products = $products; |
|
160
|
|
|
|
|
161
|
|
|
return $this; |
|
162
|
|
|
} |
|
163
|
|
|
|
|
164
|
|
|
public function getProductsList(): array |
|
165
|
|
|
{ |
|
166
|
|
|
return $this->productsList; |
|
167
|
|
|
} |
|
168
|
|
|
|
|
169
|
|
|
public function setProductsList(array $productsList): self |
|
170
|
|
|
{ |
|
171
|
|
|
$this->productsList = $productsList; |
|
172
|
|
|
|
|
173
|
|
|
return $this; |
|
174
|
|
|
} |
|
175
|
|
|
|
|
176
|
|
|
public function addProduct(Product $product): self |
|
177
|
|
|
{ |
|
178
|
|
|
$this->products[spl_object_hash($product)] = $product; |
|
179
|
|
|
|
|
180
|
|
|
return $this; |
|
181
|
|
|
} |
|
182
|
|
|
|
|
183
|
|
|
public function removeProduct(Product $product): self |
|
184
|
|
|
{ |
|
185
|
|
|
unset($this->products[spl_object_hash($product)]); |
|
186
|
|
|
|
|
187
|
|
|
return $this; |
|
188
|
|
|
} |
|
189
|
|
|
|
|
190
|
|
|
public function hasProducts(Product $product): bool |
|
191
|
|
|
{ |
|
192
|
|
|
return array_key_exists(spl_object_hash($product), $this->products); |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
public function getTurnoverType(): ?string |
|
196
|
|
|
{ |
|
197
|
|
|
return $this->turnoverType; |
|
198
|
|
|
} |
|
199
|
|
|
|
|
200
|
|
|
public function setTurnoverType(?string $turnoverType): self |
|
201
|
|
|
{ |
|
202
|
|
|
$this->turnoverType = $turnoverType; |
|
203
|
|
|
|
|
204
|
|
|
return $this; |
|
205
|
|
|
} |
|
206
|
|
|
|
|
207
|
|
|
public function getDocumentNum(): ?string |
|
208
|
|
|
{ |
|
209
|
|
|
return $this->documentNum; |
|
210
|
|
|
} |
|
211
|
|
|
|
|
212
|
|
|
public function setDocumentNum(?string $documentNum): self |
|
213
|
|
|
{ |
|
214
|
|
|
$this->documentNum = $documentNum; |
|
215
|
|
|
|
|
216
|
|
|
return $this; |
|
217
|
|
|
} |
|
218
|
|
|
|
|
219
|
|
|
public function getDocumentDate(): ?string |
|
220
|
|
|
{ |
|
221
|
|
|
return $this->documentDate; |
|
222
|
|
|
} |
|
223
|
|
|
|
|
224
|
|
|
public function setDocumentDate(?string $documentDate): self |
|
225
|
|
|
{ |
|
226
|
|
|
$this->documentDate = $documentDate; |
|
227
|
|
|
|
|
228
|
|
|
return $this; |
|
229
|
|
|
} |
|
230
|
|
|
|
|
231
|
|
|
public function getSale(): ?string |
|
232
|
|
|
{ |
|
233
|
|
|
return $this->sale; |
|
234
|
|
|
} |
|
235
|
|
|
|
|
236
|
|
|
public function setSale(?string $sale): self |
|
237
|
|
|
{ |
|
238
|
|
|
$this->sale = $sale; |
|
239
|
|
|
|
|
240
|
|
|
return $this; |
|
241
|
|
|
} |
|
242
|
|
|
|
|
243
|
|
|
public function getWithdrawalFromTurnover(): ?string |
|
244
|
|
|
{ |
|
245
|
|
|
return $this->withdrawalFromTurnover; |
|
246
|
|
|
} |
|
247
|
|
|
|
|
248
|
|
|
public function setWithdrawalFromTurnover(?string $withdrawalFromTurnover): self |
|
249
|
|
|
{ |
|
250
|
|
|
$this->withdrawalFromTurnover = $withdrawalFromTurnover; |
|
251
|
|
|
|
|
252
|
|
|
return $this; |
|
253
|
|
|
} |
|
254
|
|
|
|
|
255
|
|
|
public function getTransferDate(): ?string |
|
256
|
|
|
{ |
|
257
|
|
|
return $this->transferDate; |
|
258
|
|
|
} |
|
259
|
|
|
|
|
260
|
|
|
public function setTransferDate(?string $transferDate): self |
|
261
|
|
|
{ |
|
262
|
|
|
$this->transferDate = $transferDate; |
|
263
|
|
|
|
|
264
|
|
|
return $this; |
|
265
|
|
|
} |
|
266
|
|
|
|
|
267
|
|
|
public function getReceiverInn(): ?string |
|
268
|
|
|
{ |
|
269
|
|
|
return $this->receiverInn; |
|
270
|
|
|
} |
|
271
|
|
|
|
|
272
|
|
|
public function setReceiverInn(?string $receiverInn): self |
|
273
|
|
|
{ |
|
274
|
|
|
$this->receiverInn = $receiverInn; |
|
275
|
|
|
|
|
276
|
|
|
return $this; |
|
277
|
|
|
} |
|
278
|
|
|
|
|
279
|
|
|
public function getOwnerInn(): ?string |
|
280
|
|
|
{ |
|
281
|
|
|
return $this->ownerInn; |
|
282
|
|
|
} |
|
283
|
|
|
|
|
284
|
|
|
public function setOwnerInn(?string $ownerInn): self |
|
285
|
|
|
{ |
|
286
|
|
|
$this->ownerInn = $ownerInn; |
|
287
|
|
|
|
|
288
|
|
|
return $this; |
|
289
|
|
|
} |
|
290
|
|
|
} |
|
291
|
|
|
|