1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace Carpenstar\ByBitAPI\Spot\LeverageToken\PurchaseRedeemHistory\Request; |
4
|
|
|
|
5
|
|
|
use Carpenstar\ByBitAPI\Core\Objects\AbstractParameters; |
6
|
|
|
use Carpenstar\ByBitAPI\Spot\LeverageToken\PurchaseRedeemHistory\Interfaces\IPurchaseRedeemHistoryRequestInterface; |
7
|
|
|
|
8
|
|
|
class PurchaseRedeemHistoryRequest extends AbstractParameters implements IPurchaseRedeemHistoryRequestInterface |
9
|
|
|
{ |
10
|
|
|
/** |
11
|
|
|
* Abbreviation of the LT. |
12
|
|
|
* @var string $ltCode |
13
|
|
|
*/ |
14
|
|
|
protected string $ltCode; |
15
|
|
|
|
16
|
|
|
/** |
17
|
|
|
* Order ID |
18
|
|
|
* @var string $orderId |
19
|
|
|
*/ |
20
|
|
|
protected string $orderId; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Start timestamp |
24
|
|
|
* @var \DateTime $startTime |
25
|
|
|
*/ |
26
|
|
|
protected \DateTime $startTime; |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* End timestamp |
30
|
|
|
* @var \DateTime $endTime |
31
|
|
|
*/ |
32
|
|
|
protected \DateTime $endTime; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* Limit for data size. [1, 500]. Default: 100 |
36
|
|
|
* @var int $limit = 100; |
37
|
|
|
*/ |
38
|
|
|
protected int $limit; |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* Order type; 1: Purchase; 2: Redeem |
42
|
|
|
* @var int $orderType |
43
|
|
|
*/ |
44
|
|
|
protected int $orderType; |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* Serial number |
48
|
|
|
* @var string $serialNo |
49
|
|
|
*/ |
50
|
|
|
protected string $serialNo; |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return string |
54
|
|
|
*/ |
55
|
|
|
public function getLtCode(): string |
56
|
|
|
{ |
57
|
|
|
return $this->ltCode; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param string $ltCode |
62
|
|
|
* @return PurchaseRedeemHistoryRequest |
63
|
|
|
*/ |
64
|
|
|
public function setLtCode(string $ltCode): self |
65
|
|
|
{ |
66
|
|
|
$this->ltCode = $ltCode; |
67
|
|
|
return $this; |
68
|
|
|
} |
69
|
|
|
|
70
|
|
|
/** |
71
|
|
|
* @return string |
72
|
|
|
*/ |
73
|
|
|
public function getOrderId(): string |
74
|
|
|
{ |
75
|
|
|
return $this->orderId; |
76
|
|
|
} |
77
|
|
|
|
78
|
|
|
/** |
79
|
|
|
* @param string $orderId |
80
|
|
|
* @return PurchaseRedeemHistoryRequest |
81
|
|
|
*/ |
82
|
|
|
public function setOrderId(string $orderId): self |
83
|
|
|
{ |
84
|
|
|
$this->orderId = $orderId; |
85
|
|
|
return $this; |
86
|
|
|
} |
87
|
|
|
|
88
|
|
|
/** |
89
|
|
|
* @return \DateTime |
90
|
|
|
*/ |
91
|
|
|
public function getStartTime(): \DateTime |
92
|
|
|
{ |
93
|
|
|
return $this->startTime; |
94
|
|
|
} |
95
|
|
|
|
96
|
|
|
/** |
97
|
|
|
* @param \DateTime $startTime |
98
|
|
|
* @return PurchaseRedeemHistoryRequest |
99
|
|
|
*/ |
100
|
|
|
public function setStartTime(\DateTime $startTime): self |
101
|
|
|
{ |
102
|
|
|
$this->startTime = $startTime; |
103
|
|
|
return $this; |
104
|
|
|
} |
105
|
|
|
|
106
|
|
|
/** |
107
|
|
|
* @return \DateTime |
108
|
|
|
*/ |
109
|
|
|
public function getEndTime(): \DateTime |
110
|
|
|
{ |
111
|
|
|
return $this->endTime; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
/** |
115
|
|
|
* @param \DateTime $endTime |
116
|
|
|
* @return PurchaseRedeemHistoryRequest |
117
|
|
|
*/ |
118
|
|
|
public function setEndTime(\DateTime $endTime): self |
119
|
|
|
{ |
120
|
|
|
$this->endTime = $endTime; |
121
|
|
|
return $this; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return int |
126
|
|
|
*/ |
127
|
|
|
public function getLimit(): int |
128
|
|
|
{ |
129
|
|
|
return $this->limit; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param int $limit |
134
|
|
|
* @return PurchaseRedeemHistoryRequest |
135
|
|
|
*/ |
136
|
|
|
public function setLimit(int $limit): self |
137
|
|
|
{ |
138
|
|
|
$this->limit = $limit; |
139
|
|
|
return $this; |
140
|
|
|
} |
141
|
|
|
|
142
|
|
|
/** |
143
|
|
|
* @return int |
144
|
|
|
*/ |
145
|
|
|
public function getOrderType(): int |
146
|
|
|
{ |
147
|
|
|
return $this->orderType; |
148
|
|
|
} |
149
|
|
|
|
150
|
|
|
/** |
151
|
|
|
* @param int $orderType |
152
|
|
|
* @return PurchaseRedeemHistoryRequest |
153
|
|
|
*/ |
154
|
|
|
public function setOrderType(int $orderType): self |
155
|
|
|
{ |
156
|
|
|
$this->orderType = $orderType; |
157
|
|
|
return $this; |
158
|
|
|
} |
159
|
|
|
|
160
|
|
|
/** |
161
|
|
|
* @return string |
162
|
|
|
*/ |
163
|
|
|
public function getSerialNo(): string |
164
|
|
|
{ |
165
|
|
|
return $this->serialNo; |
166
|
|
|
} |
167
|
|
|
|
168
|
|
|
/** |
169
|
|
|
* @param string $serialNo |
170
|
|
|
* @return PurchaseRedeemHistoryRequest |
171
|
|
|
*/ |
172
|
|
|
public function setSerialNo(string $serialNo): self |
173
|
|
|
{ |
174
|
|
|
$this->serialNo = $serialNo; |
175
|
|
|
return $this; |
176
|
|
|
} |
177
|
|
|
} |
178
|
|
|
|