Passed
Push — main ( 6bf038...578b82 )
by Aleksandr
03:45 queued 32s
created

OrderDelivery::getOutStrBarcode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Models;
6
7
use DalliSDK\Traits\Fillable;
8
use JMS\Serializer\Annotation as JMS;
9
10
/**
11
 * Модель для ответа на "Запрос статусов доставки"
12
 *
13
 * @see https://api.dalli-service.com/v1/doc/request-delivery-status
14
 * @JMS\XmlRoot("order")
15
 */
16
class OrderDelivery
17
{
18
    use Fillable;
19
20
    /**
21
     * Номер заказа в системе учета ИМ
22
     *
23
     * @JMS\XmlAttribute()
24
     * @JMS\Type("string")
25
     * @JMS\SerializedName("orderno")
26
     */
27
    private string $orderNo;
28
29
    /**
30
     * Внутренний код заказа в системе Dalli; применяется для некоторых внутренних операций
31
     *
32
     * @JMS\XmlAttribute()
33
     * @JMS\Type("string")
34
     * @JMS\SerializedName("ordercode")
35
     */
36
    private string $orderCode;
37
38
    /**
39
     * Штрих-код заказа
40
     *
41
     * @JMS\XmlAttribute()
42
     * @JMS\Type("string")
43
     * @JMS\SerializedName("givencode")
44
     */
45
    private string $givenCode;
46
47
    /**
48
     * Штрих-код заказа
49
     *
50
     * @JMS\XmlAttribute()
51
     * @JMS\Type("string")
52
     * @JMS\SerializedName("awb")
53
     */
54
    private string $awb;
55
56
    /**
57
     * Штрих-код заказа
58
     *
59
     * @JMS\Type("string")
60
     * @JMS\SerializedName("barcode")
61
     */
62
    private string $barcode;
63
64
    /**
65
     * Контейнер информации о получателе
66
     *
67
     * @JMS\Type("DalliSDK\Models\Receiver")
68
     * @JMS\SerializedName("receiver")
69
     */
70
    private Receiver $receiver;
71
72
    /**
73
     * Фактический вес заказа
74
     *
75
     * @JMS\Type("float")
76
     * @JMS\SerializedName("weight")
77
     */
78
    private float $weight;
79
80
    /**
81
     * Кол-во мест
82
     *
83
     * @JMS\Type("int")
84
     * @JMS\SerializedName("quantity")
85
     */
86
    private int $quantity;
87
88
    /**
89
     * Тип оплаты (CASH - наличными курьеру, CARD - картой курьеру, NO - курьер денег не берет)
90
     *
91
     * @JMS\Type("string")
92
     * @JMS\SerializedName("paytype")
93
     */
94
    private string $payType = 'CASH';
95
96
    /**
97
     * Тип доставки
98
     *
99
     * @JMS\Type("int")
100
     * @JMS\SerializedName("service")
101
     */
102
    private int $service;
103
104
    /**
105
     * Вложение; используется для справочной информации
106
     *
107
     * @JMS\Type("string")
108
     * @JMS\SerializedName("enclosure")
109
     */
110
    private ?string $enclosure = null;
111
112
    /**
113
     * Акт возврата
114
     *
115
     * @JMS\Type("DalliSDK\Models\Acta")
116
     * @JMS\SerializedName("acta")
117
     */
118
    private Acta $acta;
119
120
    /**
121
     * Наложенный платеж
122
     *
123
     * @JMS\Type("float")
124
     * @JMS\SerializedName("price")
125
     */
126
    private float $price;
127
128
    /**
129
     * Объявленная ценность
130
     *
131
     * @JMS\Type("float")
132
     * @JMS\SerializedName("inshprice")
133
     */
134
    private float $inshPrice;
135
136
    /**
137
     * Текстовое поле для внутренних нужд
138
     *
139
     * @JMS\Type("string")
140
     * @JMS\SerializedName("department")
141
     */
142
    private ?string $department = null;
143
144
    /**
145
     * Текстовое поле для внутренних нужд
146
     *
147
     * @JMS\Type("string")
148
     * @JMS\SerializedName("costcode")
149
     */
150
    private ?string $costCode = null;
151
152
    /**
153
     * Внешний код (используется при магистральных перевозках, межгороде, доставке через партнеров)
154
     *
155
     * @JMS\Type("string")
156
     * @JMS\SerializedName("outstrbarcode")
157
     */
158
    private ?string $outStrBarcode = null;
159
160
    /**
161
     * Комментарий получателя; дополнительная информация для курьера
162
     *
163
     * @JMS\Type("string")
164
     * @JMS\SerializedName("instruction")
165
     */
166
    private ?string $instruction = null;
167
168
    /**
169
     * Контейнер информации о курьере
170
     *
171
     * @JMS\Type("DalliSDK\Models\Courier")
172
     * @JMS\SerializedName("courier")
173
     */
174
    private ?Courier $courier = null;
175
176
    /**
177
     * Контейнер стоимости доставки
178
     *
179
     * @JMS\Type("DalliSDK\Models\DeliveryPrice")
180
     * @JMS\SerializedName("deliveryprice")
181
     */
182
    private DeliveryPrice $deliveryPrice;
183
184
    /**
185
     * Текущий статус заказа
186
     *
187
     * @JMS\Type("DalliSDK\Models\Status")
188
     * @JMS\SerializedName("status")
189
     */
190
    private Status $status;
191
192
    /**
193
     * Контейнер хронологии изменений, содержит 1 или несколько элементов вида order->status
194
     *
195
     * @JMS\Type("DalliSDK\Models\StatusHistory")
196
     * @JMS\SerializedName("statushistory")
197
     */
198
    private StatusHistory $statusHistory;
199
200
    /**
201
     * Информация о доставке
202
     *
203
     * @JMS\Type("string")
204
     * @JMS\SerializedName("deliveredto")
205
     */
206
    private ?string $deliveredTo = null;
207
208
    /**
209
     * Дата доставки (Y-m-d)
210
     *
211
     * @JMS\Type("DateTimeImmutable<'Y-m-d'>")
212
     * @JMS\SerializedName("delivereddate")
213
     */
214
    private ?\DateTimeImmutable $deliveredDate = null;
215
216
    /**
217
     * Время доставки (H:i:s)
218
     *
219
     * @JMS\Type("string")
220
     * @JMS\SerializedName("deliveredtime")
221
     */
222
    private ?string $deliveredTime = null;
223
224
    /**
225
     * Ссылка на чек, в атрибутах указаны поля по отдельности
226
     *
227
     * @JMS\Type("DalliSDK\Models\Receipt")
228
     * @JMS\SerializedName("receipt")
229
     */
230
    private ?Receipt $receipt = null;
231
232
    /**
233
     * Контейнер товарных позиций
234
     *
235
     * @JMS\Type("array<DalliSDK\Models\Item>")
236
     * @JMS\XmlList(entry = "item")
237
     * @JMS\SerializedName("items")
238
     *
239
     * @var Item[]
240
     */
241
    private array $items;
242
243
    /**
244
     * Контейнер товарных мест
245
     *
246
     * @JMS\Type("array<DalliSDK\Models\Package>")
247
     * @JMS\XmlList(entry = "package")
248
     * @JMS\SerializedName("packages")
249
     *
250
     * @var Package[]
251
     */
252
    private ?array $packages = null;
253
254
    /**
255
     * @return string
256
     */
257 1
    public function getOrderNo(): string
258
    {
259 1
        return $this->orderNo;
260
    }
261
262
    /**
263
     * @return string
264
     */
265 1
    public function getOrderCode(): string
266
    {
267 1
        return $this->orderCode;
268
    }
269
270
    /**
271
     * @return string
272
     */
273 1
    public function getGivenCode(): string
274
    {
275 1
        return $this->givenCode;
276
    }
277
278
    /**
279
     * @return string
280
     */
281 1
    public function getAwb(): string
282
    {
283 1
        return $this->awb;
284
    }
285
286
    /**
287
     * @return string
288
     */
289 1
    public function getBarcode(): string
290
    {
291 1
        return $this->barcode;
292
    }
293
294
    /**
295
     * @return Receiver
296
     */
297 1
    public function getReceiver(): Receiver
298
    {
299 1
        return $this->receiver;
300
    }
301
302
    /**
303
     * @return float
304
     */
305 1
    public function getWeight(): float
306
    {
307 1
        return $this->weight;
308
    }
309
310
    /**
311
     * @return int
312
     */
313 1
    public function getQuantity(): int
314
    {
315 1
        return $this->quantity;
316
    }
317
318
    /**
319
     * @return string
320
     */
321 1
    public function getPayType(): string
322
    {
323 1
        return $this->payType;
324
    }
325
326
    /**
327
     * @return int
328
     */
329 1
    public function getService(): int
330
    {
331 1
        return $this->service;
332
    }
333
334
    /**
335
     * @return string|null
336
     */
337 1
    public function getEnclosure(): ?string
338
    {
339 1
        return $this->enclosure;
340
    }
341
342
    /**
343
     * @return Acta
344
     */
345 1
    public function getActa(): Acta
346
    {
347 1
        return $this->acta;
348
    }
349
350
    /**
351
     * @return float
352
     */
353 1
    public function getPrice(): float
354
    {
355 1
        return $this->price;
356
    }
357
358
    /**
359
     * @return float
360
     */
361 1
    public function getInshPrice(): float
362
    {
363 1
        return $this->inshPrice;
364
    }
365
366
    /**
367
     * @return string|null
368
     */
369 1
    public function getDepartment(): ?string
370
    {
371 1
        return $this->department;
372
    }
373
374
    /**
375
     * @return string|null
376
     */
377 1
    public function getCostCode(): ?string
378
    {
379 1
        return $this->costCode;
380
    }
381
382
    /**
383
     * @return string|null
384
     */
385 1
    public function getOutStrBarcode(): ?string
386
    {
387 1
        return $this->outStrBarcode;
388
    }
389
390
    /**
391
     * @return string|null
392
     */
393 1
    public function getInstruction(): ?string
394
    {
395 1
        return $this->instruction;
396
    }
397
398
    /**
399
     * @return Courier|null
400
     */
401 1
    public function getCourier(): ?Courier
402
    {
403 1
        return $this->courier;
404
    }
405
406
    /**
407
     * @return DeliveryPrice
408
     */
409 1
    public function getDeliveryPrice(): DeliveryPrice
410
    {
411 1
        return $this->deliveryPrice;
412
    }
413
414
    /**
415
     * @return Status
416
     */
417 1
    public function getStatus(): Status
418
    {
419 1
        return $this->status;
420
    }
421
422
    /**
423
     * @return StatusHistory
424
     */
425 1
    public function getStatusHistory(): StatusHistory
426
    {
427 1
        return $this->statusHistory;
428
    }
429
430
    /**
431
     * @return string|null
432
     */
433 1
    public function getDeliveredTo(): ?string
434
    {
435 1
        return $this->deliveredTo;
436
    }
437
438
    /**
439
     * @return \DateTimeImmutable|null
440
     */
441 1
    public function getDeliveredDate(): ?\DateTimeImmutable
442
    {
443 1
        return $this->deliveredDate;
444
    }
445
446
    /**
447
     * @return string|null
448
     */
449 1
    public function getDeliveredTime(): ?string
450
    {
451 1
        return $this->deliveredTime;
452
    }
453
454
    /**
455
     * @return Receipt|null
456
     */
457 1
    public function getReceipt(): ?Receipt
458
    {
459 1
        return $this->receipt;
460
    }
461
462
    /**
463
     * @return array
464
     */
465 1
    public function getItems(): array
466
    {
467 1
        return $this->items;
468
    }
469
470
    /**
471
     * @return array|null
472
     */
473 1
    public function getPackages(): ?array
474
    {
475 1
        return $this->packages;
476
    }
477
}
478