OrderDeliveryStatusRequest   A
last analyzed

Complexity

Total Complexity 10

Size/Duplication

Total Lines 136
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 22
c 1
b 0
f 0
dl 0
loc 136
ccs 25
cts 25
cp 1
rs 10
wmc 10

10 Methods

Rating   Name   Duplication   Size   Complexity  
A getDateDelivery() 0 3 1
A setChanges() 0 4 1
A getChanges() 0 3 1
A getDateTo() 0 3 1
A setDateTo() 0 4 1
A setDateFrom() 0 4 1
A getOrderNo() 0 3 1
A setOrderNo() 0 4 1
A getDateFrom() 0 3 1
A setDateDelivery() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace DalliSDK\Requests;
6
7
use DalliSDK\Responses\OrderDeliveryStatusResponse;
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("statusreq")
15
 */
16
class OrderDeliveryStatusRequest extends AbstractRequest implements RequestInterface
17
{
18
    public const RESPONSE_CLASS = OrderDeliveryStatusResponse::class;
19
20
    /**
21
     * Номер заказа
22
     *
23
     * @JMS\Type("string")
24
     * @JMS\SerializedName("orderno")
25
     */
26
    private string $orderNo;
27
28
    /**
29
     * Дата "с"
30
     *
31
     * @JMS\Type("DateTime<'Y-m-d'>")
32
     * @JMS\SerializedName("datefrom")
33
     */
34
    private \DateTimeInterface $dateFrom;
35
36
    /**
37
     * Дата "по"
38
     * @JMS\Type("DateTime<'Y-m-d'>")
39
     * @JMS\SerializedName("dateto")
40
     */
41
    private \DateTimeInterface $dateTo;
42
43
    /**
44
     * Может принимать значение только ONLY_LAST. Если указан этот параметр, все остальные игнорируются.
45
     *
46
     * @JMS\Type("string")
47
     * @JMS\SerializedName("changes")
48
     */
49
    private ?string $changes = null;
50
51
    /**
52
     * По умолчанию идёт поиск по дате оформления, но если указать в этом параметре YES, то поиск будет идти по дате доставки
53
     *
54
     * @JMS\Type("string")
55
     * @JMS\SerializedName("datedelivery")
56
     */
57
    private ?string $dateDelivery = null;
58
59
    /**
60
     * @return string
61
     */
62 1
    public function getOrderNo(): string
63
    {
64 1
        return $this->orderNo;
65
    }
66
67
    /**
68
     * @param string $orderNo
69
     *
70
     * @return OrderDeliveryStatusRequest
71
     */
72 1
    public function setOrderNo(string $orderNo): OrderDeliveryStatusRequest
73
    {
74 1
        $this->orderNo = $orderNo;
75 1
        return $this;
76
    }
77
78
    /**
79
     * @return \DateTimeInterface
80
     */
81 1
    public function getDateFrom(): \DateTimeInterface
82
    {
83 1
        return $this->dateFrom;
84
    }
85
86
    /**
87
     * @param \DateTimeInterface $dateFrom
88
     *
89
     * @return OrderDeliveryStatusRequest
90
     */
91 1
    public function setDateFrom(\DateTimeInterface $dateFrom): OrderDeliveryStatusRequest
92
    {
93 1
        $this->dateFrom = $dateFrom;
94 1
        return $this;
95
    }
96
97
    /**
98
     * @return \DateTimeInterface
99
     */
100 1
    public function getDateTo(): \DateTimeInterface
101
    {
102 1
        return $this->dateTo;
103
    }
104
105
    /**
106
     * @param \DateTimeInterface $dateTo
107
     *
108
     * @return OrderDeliveryStatusRequest
109
     */
110 1
    public function setDateTo(\DateTimeInterface $dateTo): OrderDeliveryStatusRequest
111
    {
112 1
        $this->dateTo = $dateTo;
113 1
        return $this;
114
    }
115
116
    /**
117
     * @return string|null
118
     */
119 1
    public function getChanges(): ?string
120
    {
121 1
        return $this->changes;
122
    }
123
124
    /**
125
     * @param string|null $changes
126
     *
127
     * @return OrderDeliveryStatusRequest
128
     */
129 1
    public function setChanges(?string $changes): OrderDeliveryStatusRequest
130
    {
131 1
        $this->changes = $changes;
132 1
        return $this;
133
    }
134
135
    /**
136
     * @return string|null
137
     */
138 1
    public function getDateDelivery(): ?string
139
    {
140 1
        return $this->dateDelivery;
141
    }
142
143
    /**
144
     * @param string|null $dateDelivery
145
     *
146
     * @return OrderDeliveryStatusRequest
147
     */
148 1
    public function setDateDelivery(?string $dateDelivery): OrderDeliveryStatusRequest
149
    {
150 1
        $this->dateDelivery = $dateDelivery;
151 1
        return $this;
152
    }
153
}
154