Passed
Pull Request — master (#10)
by Vladislav
03:04
created

GetExecutionListRequest::setSymbol()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 4
rs 10
1
<?php
2
namespace Carpenstar\ByBitAPI\Derivatives\Contract\Position\GetExecutionList\Request;
3
4
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters;
5
use Carpenstar\ByBitAPI\Derivatives\Contract\Position\GetExecutionList\Interfaces\IGetExecutionListRequestInterface;
6
7
class GetExecutionListRequest extends AbstractParameters implements IGetExecutionListRequestInterface
8
{
9
    /**
10
     * Symbol name
11
     * @var string $symbol
12
     */
13
    protected string $symbol;
14
15
    /**
16
     * Order ID. Return all records if not passed
17
     * @var string $orderId
18
     */
19
    protected string $orderId;
20
21
    /**
22
     * The start timestamp (ms)
23
     * @var int $startTime
24
     */
25
    protected int $startTime;
26
27
    /**
28
     * The end timestamp (ms)
29
     * @var int $endTime
30
     */
31
    protected int $endTime;
32
33
    /**
34
     * Execution type
35
     * @var string $execType
36
     */
37
    protected string $execType;
38
39
    /**
40
     * Limit for data size per page. [1, 100]. Default: 50
41
     * @var int $limit
42
     */
43
    protected int $limit = 50;
44
45
    /**
46
     * Cursor. Use the nextPageCursor token from the response to retrieve the next page of the result set
47
     * @var string $cursor
48
     */
49
    protected string $cursor;
50
51
    public function __construct()
52
    {
53
        $this->setRequiredField("symbol");
54
    }
55
56
    /**
57
     * @return string
58
     */
59
    public function getSymbol(): string
60
    {
61
        return $this->symbol;
62
    }
63
64
    /**
65
     * @param string $symbol
66
     * @return GetExecutionListRequest
67
     */
68
    public function setSymbol(string $symbol): self
69
    {
70
        $this->symbol = $symbol;
71
        return $this;
72
    }
73
74
    /**
75
     * @return string
76
     */
77
    public function getOrderId(): string
78
    {
79
        return $this->orderId;
80
    }
81
82
    /**
83
     * @param string $orderId
84
     * @return GetExecutionListRequest
85
     */
86
    public function setOrderId(string $orderId): self
87
    {
88
        $this->orderId = $orderId;
89
        return $this;
90
    }
91
92
    /**
93
     * @return int
94
     */
95
    public function getStartTime(): int
96
    {
97
        return $this->startTime;
98
    }
99
100
    /**
101
     * @param int $startTime
102
     * @return GetExecutionListRequest
103
     */
104
    public function setStartTime(int $startTime): self
105
    {
106
        $this->startTime = $startTime;
107
        return $this;
108
    }
109
110
    /**
111
     * @return int
112
     */
113
    public function getEndTime(): int
114
    {
115
        return $this->endTime;
116
    }
117
118
    /**
119
     * @param int $endTime
120
     * @return GetExecutionListRequest
121
     */
122
    public function setEndTime(int $endTime): self
123
    {
124
        $this->endTime = $endTime;
125
        return $this;
126
    }
127
128
    /**
129
     * @return string
130
     */
131
    public function getExecType(): string
132
    {
133
        return $this->execType;
134
    }
135
136
    /**
137
     * @param string $execType
138
     * @return GetExecutionListRequest
139
     */
140
    public function setExecType(string $execType): self
141
    {
142
        $this->execType = $execType;
143
        return $this;
144
    }
145
146
    /**
147
     * @return int
148
     */
149
    public function getLimit(): int
150
    {
151
        return $this->limit;
152
    }
153
154
    /**
155
     * @param int $limit
156
     */
157
    public function setLimit(int $limit): self
158
    {
159
        $this->limit = $limit;
160
        return $this;
161
    }
162
163
    /**
164
     * @return string
165
     */
166
    public function getCursor(): string
167
    {
168
        return $this->cursor;
169
    }
170
171
    /**
172
     * @param string $cursor
173
     * @return GetExecutionListRequest
174
     */
175
    public function setCursor(string $cursor): self
176
    {
177
        $this->cursor = $cursor;
178
        return $this;
179
    }
180
181
182
}