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