Test Failed
Pull Request — master (#13)
by Vladislav
09:26 queued 01:13
created

AllAssetInfoResponseItem   A

Complexity

Total Complexity 19

Size/Duplication

Total Lines 271
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 55
dl 0
loc 271
rs 10
c 1
b 0
f 0
wmc 19

19 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 20 1
A getLtName() 0 3 1
A getPurchaseFeeRate() 0 3 1
A getFundFee() 0 3 1
A getManageFeeTime() 0 3 1
A getRedeemFeeRate() 0 3 1
A getManageFeeRate() 0 3 1
A getMaxPurchase() 0 3 1
A getMaxRedeem() 0 3 1
A getTotal() 0 3 1
A getNetValue() 0 3 1
A getMaxPurchaseDaily() 0 3 1
A getValue() 0 3 1
A getStatus() 0 3 1
A getMinRedeem() 0 3 1
A getLtCode() 0 3 1
A getMaxRedeemDaily() 0 3 1
A getFundFeeTime() 0 3 1
A getMinPurchase() 0 3 1
1
<?php
2
3
namespace Carpenstar\ByBitAPI\Spot\LeverageToken\AllAssetInfo\Response;
4
5
use Carpenstar\ByBitAPI\Core\Helpers\DateTimeHelper;
6
use Carpenstar\ByBitAPI\Core\Objects\AbstractResponse;
7
use Carpenstar\ByBitAPI\Spot\LeverageToken\AllAssetInfo\Interfaces\IAllAssetInfoResponseItemInterface;
8
9
class AllAssetInfoResponseItem extends AbstractResponse implements IAllAssetInfoResponseItemInterface
10
{
11
    /**
12
     * Abbreviation of the LT
13
     * @var string $ltCode
14
     */
15
    private string $ltCode;
16
17
    /**
18
     * Full name of the LT
19
     * @var string $ltName
20
     */
21
    private string $ltName;
22
23
    /**
24
     * Max. purchase amount per transaction
25
     * @var float $maxPurchase
26
     */
27
    private float $maxPurchase;
28
29
    /**
30
     * Min. purchase amount per transaction
31
     * @var float $minPurchase
32
     */
33
    private float $minPurchase;
34
35
    /**
36
     * Max. purchase amount per day
37
     * @var float $maxPurchaseDaily
38
     */
39
    private float $maxPurchaseDaily;
40
41
    /**
42
     * Max. redemption amount per transaction
43
     * @var float $maxRedeem
44
     */
45
    private float $maxRedeem;
46
47
    /**
48
     * Min. redemption amount per transaction
49
     * @var float $minRedeem
50
     */
51
    private float $minRedeem;
52
53
    /**
54
     * Max. redemption amount per day
55
     * @var float $maxRedeemDaily
56
     */
57
    private float $maxRedeemDaily;
58
59
    /**
60
     * Purchase fees
61
     * @var float $purchaseFeeRate
62
     */
63
    private float $purchaseFeeRate;
64
65
    /**
66
     * Redemption fees
67
     * @var float $redeemFeeRate
68
     */
69
    private float $redeemFeeRate;
70
71
    /**
72
     * Whether the LT can be purchased or redeemed
73
     * @var string $status
74
     */
75
    private string $status;
76
77
    /**
78
     * Funding fees charged daily to users who hold LT
79
     * @var float $fundFee
80
     */
81
    private float $fundFee;
82
83
    /**
84
     * Timestamps when funding fees are charged
85
     * @var \DateTime $fundFeeTime
86
     */
87
    private \DateTime $fundFeeTime;
88
89
    /**
90
     * Management fees
91
     * @var float $manageFeeRate
92
     */
93
    private float $manageFeeRate;
94
95
    /**
96
     * Timestamps when management fees are charged
97
     * @var \DateTime $manageFeeTime
98
     */
99
    private \DateTime $manageFeeTime;
100
101
    /**
102
     * Application upper limit
103
     * @var float $total
104
     */
105
    private float $total;
106
107
    /**
108
     * Net asset value
109
     * @var float $netValue
110
     */
111
    private float $netValue;
112
113
    private float $value;
114
115
    public function __construct(array $data)
116
    {
117
        $this->ltCode = $data['ltCode'];
118
        $this->ltName = $data['ltName'];
119
        $this->maxPurchase = $data['maxPurchase'];
120
        $this->minPurchase = $data['minPurchase'];
121
        $this->maxPurchaseDaily = $data['maxPurchaseDaily'];
122
        $this->maxRedeem = $data['maxRedeem'];
123
        $this->maxRedeemDaily = $data['maxRedeemDaily'];
124
        $this->purchaseFeeRate = $data['purchaseFeeRate'];
125
        $this->redeemFeeRate = $data['redeemFeeRate'];
126
        $this->status = $data['status'];
127
        $this->fundFee = $data['fundFee'];
128
        $this->fundFeeTime = DateTimeHelper::makeFromTimestamp($data['fundFeeTime']);
129
        $this->manageFeeRate = $data['manageFeeRate'];
130
        $this->manageFeeTime = DateTimeHelper::makeFromTimestamp($data['manageFeeTime']);
131
        $this->total = $data['total'];
132
        $this->netValue = $data['netValue'];
133
        $this->value = $data['value'];
134
        $this->minRedeem = $data['minRedeem'];
135
    }
136
137
    /**
138
     * @return string
139
     */
140
    public function getLtCode(): string
141
    {
142
        return $this->ltCode;
143
    }
144
145
    /**
146
     * @return string
147
     */
148
    public function getLtName(): string
149
    {
150
        return $this->ltName;
151
    }
152
153
    /**
154
     * @return float
155
     */
156
    public function getMaxPurchase(): float
157
    {
158
        return $this->maxPurchase;
159
    }
160
161
162
    /**
163
     * @return float
164
     */
165
    public function getMinPurchase(): float
166
    {
167
        return $this->minPurchase;
168
    }
169
170
    /**
171
     * @return float
172
     */
173
    public function getMaxPurchaseDaily(): float
174
    {
175
        return $this->maxPurchaseDaily;
176
    }
177
178
    /**
179
     * @return float
180
     */
181
    public function getMaxRedeem(): float
182
    {
183
        return $this->maxRedeem;
184
    }
185
186
    /**
187
     * @return float
188
     */
189
    public function getMinRedeem(): float
190
    {
191
        return $this->minRedeem;
192
    }
193
194
    /**
195
     * @return float
196
     */
197
    public function getMaxRedeemDaily(): float
198
    {
199
        return $this->maxRedeemDaily;
200
    }
201
202
    /**
203
     * @return float
204
     */
205
    public function getPurchaseFeeRate(): float
206
    {
207
        return $this->purchaseFeeRate;
208
    }
209
210
    /**
211
     * @return float
212
     */
213
    public function getRedeemFeeRate(): float
214
    {
215
        return $this->redeemFeeRate;
216
    }
217
218
    /**
219
     * @return string
220
     */
221
    public function getStatus(): string
222
    {
223
        return $this->status;
224
    }
225
226
    /**
227
     * @return float
228
     */
229
    public function getFundFee(): float
230
    {
231
        return $this->fundFee;
232
    }
233
234
    /**
235
     * @return \DateTime
236
     */
237
    public function getFundFeeTime(): \DateTime
238
    {
239
        return $this->fundFeeTime;
240
    }
241
242
    /**
243
     * @return float
244
     */
245
    public function getManageFeeRate(): float
246
    {
247
        return $this->manageFeeRate;
248
    }
249
250
    /**
251
     * @return \DateTime
252
     */
253
    public function getManageFeeTime(): \DateTime
254
    {
255
        return $this->manageFeeTime;
256
    }
257
258
    /**
259
     * @return float
260
     */
261
    public function getTotal(): float
262
    {
263
        return $this->total;
264
    }
265
266
    /**
267
     * @return float
268
     */
269
    public function getNetValue(): float
270
    {
271
        return $this->netValue;
272
    }
273
274
    /**
275
     * @return float
276
     */
277
    public function getValue(): float
278
    {
279
        return $this->value;
280
    }
281
}