Passed
Push — master ( 62d501...e74bb5 )
by
unknown
03:12 queued 01:32
created

Body::getDocType()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
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|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 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 setProducts(array $products): self
154
    {
155
        $this->products = $products;
156
157
        return $this;
158
    }
159
160
    public function addProduct(Product $product): self
161
    {
162
        $this->products[spl_object_hash($product)] = $product;
163
164
        return $this;
165
    }
166
167
    public function removeProduct(Product $product): self
168
    {
169
        unset($this->products[spl_object_hash($product)]);
170
171
        return $this;
172
    }
173
174
    public function hasProducts(Product $product): bool
175
    {
176
        return array_key_exists(spl_object_hash($product), $this->products);
177
    }
178
179
    public function getTurnoverType(): ?string
180
    {
181
        return $this->turnoverType;
182
    }
183
184
    public function setTurnoverType(?string $turnoverType): self
185
    {
186
        $this->turnoverType = $turnoverType;
187
188
        return $this;
189
    }
190
191
    public function getDocumentNum(): ?string
192
    {
193
        return $this->documentNum;
194
    }
195
196
    public function setDocumentNum(?string $documentNum): self
197
    {
198
        $this->documentNum = $documentNum;
199
200
        return $this;
201
    }
202
203
    public function getDocumentDate(): ?string
204
    {
205
        return $this->documentDate;
206
    }
207
208
    public function setDocumentDate(?string $documentDate): self
209
    {
210
        $this->documentDate = $documentDate;
211
212
        return $this;
213
    }
214
215
    public function getSale(): ?string
216
    {
217
        return $this->sale;
218
    }
219
220
    public function setSale(?string $sale): self
221
    {
222
        $this->sale = $sale;
223
224
        return $this;
225
    }
226
227
    public function getWithdrawalFromTurnover(): ?string
228
    {
229
        return $this->withdrawalFromTurnover;
230
    }
231
232
    public function setWithdrawalFromTurnover(?string $withdrawalFromTurnover): self
233
    {
234
        $this->withdrawalFromTurnover = $withdrawalFromTurnover;
235
236
        return $this;
237
    }
238
239
    public function getTransferDate(): ?string
240
    {
241
        return $this->transferDate;
242
    }
243
244
    public function setTransferDate(?string $transferDate): self
245
    {
246
        $this->transferDate = $transferDate;
247
248
        return $this;
249
    }
250
251
    public function getReceiverInn(): ?string
252
    {
253
        return $this->receiverInn;
254
    }
255
256
    public function setReceiverInn(?string $receiverInn): self
257
    {
258
        $this->receiverInn = $receiverInn;
259
260
        return $this;
261
    }
262
263
    public function getOwnerInn(): ?string
264
    {
265
        return $this->ownerInn;
266
    }
267
268
    public function setOwnerInn(?string $ownerInn): self
269
    {
270
        $this->ownerInn = $ownerInn;
271
272
        return $this;
273
    }
274
}
275