Passed
Push — main ( ad68f8...37010c )
by Aleksandr
03:12
created

ActTransferReturnRequest::getFrom()   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 1
Metric Value
cc 1
eloc 1
c 1
b 0
f 1
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\Requests\Act\TransferReturn;
6
7
use DalliSDK\Requests\AbstractRequest;
8
use DalliSDK\Requests\RequestInterface;
9
use DalliSDK\Responses\Act\TransferReturns\ActTransferReturnResponse;
10
use JMS\Serializer\Annotation as JMS;
11
12
/**
13
 * Запрос файла акта возврата
14
 *
15
 * @see https://api.dalli-service.com/v1/doc/returnTransfers
16
 * @JMS\XmlRoot("returnTransfers")
17
 */
18
class ActTransferReturnRequest extends AbstractRequest implements RequestInterface
19
{
20
    public const RESPONSE_CLASS = ActTransferReturnResponse::class;
21
22
    /**
23
     * Дата, с которой начать поиск
24
     *
25
     * @JMS\Type("DateTime<'Y-m-d'>")
26
     * @JMS\SerializedName("from")
27
     */
28
    private ?\DateTimeInterface $from = null;
29
30
    /**
31
     * Дата, по которую вести поиск
32
     *
33
     * @JMS\Type("DateTime<'Y-m-d'>")
34
     * @JMS\SerializedName("to")
35
     */
36
    private ?\DateTimeInterface $to = null;
37
38
    /**
39
     * JSON|XML меняет формат ответа (по умолчанию "XML")
40
     *
41
     * @JMS\Type("string")
42
     * @JMS\SerializedName("output")
43
     */
44
    private string $output = 'XML';
45
46
    /**
47
     * Более подробный формат ответа при значении YES, может принимать значения:
48
     *  NO - (значение по-умолчанию)
49
     *  YES
50
     *
51
     * @JMS\Type("string")
52
     * @JMS\SerializedName("detail")
53
     */
54
    private string $detail = 'YES';
55
56
    /**
57
     * Номер акта возврата
58
     *
59
     * @JMS\Type("string")
60
     * @JMS\SerializedName("aNumber")
61
     */
62
    private ?string $aNumber = null;
63
64
    /**
65
     * @return \DateTimeInterface|null
66
     */
67 1
    public function getFrom(): ?\DateTimeInterface
68
    {
69 1
        return $this->from;
70
    }
71
72
    /**
73
     * @param \DateTimeInterface|null $from
74
     *
75
     * @return ActTransferReturnRequest
76
     */
77 1
    public function setFrom(?\DateTimeInterface $from): ActTransferReturnRequest
78
    {
79 1
        $this->from = $from;
80 1
        return $this;
81
    }
82
83
    /**
84
     * @return \DateTimeInterface|null
85
     */
86 1
    public function getTo(): ?\DateTimeInterface
87
    {
88 1
        return $this->to;
89
    }
90
91
    /**
92
     * @param \DateTimeInterface|null $to
93
     *
94
     * @return ActTransferReturnRequest
95
     */
96 1
    public function setTo(?\DateTimeInterface $to): ActTransferReturnRequest
97
    {
98 1
        $this->to = $to;
99 1
        return $this;
100
    }
101
102
    /**
103
     * @return string
104
     */
105 1
    public function getOutput(): string
106
    {
107 1
        return $this->output;
108
    }
109
110
    /**
111
     * @return string
112
     */
113 1
    public function getDetail(): string
114
    {
115 1
        return $this->detail;
116
    }
117
118
    /**
119
     * @return string|null
120
     */
121 1
    public function getANumber(): ?string
122
    {
123 1
        return $this->aNumber;
124
    }
125
126
    /**
127
     * @param string|null $aNumber
128
     *
129
     * @return ActTransferReturnRequest
130
     */
131 1
    public function setANumber(?string $aNumber): ActTransferReturnRequest
132
    {
133 1
        $this->aNumber = $aNumber;
134 1
        return $this;
135
    }
136
}
137