| Total Complexity | 6 |
| Total Lines | 79 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class WalletBalanceResponseItem extends AbstractResponse implements IWalletBalanceResponseItemInterfaces |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * Coin |
||
| 13 | * @var string $coin |
||
| 14 | */ |
||
| 15 | private string $coin; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Coin ID |
||
| 19 | * @var string $coinId |
||
| 20 | */ |
||
| 21 | private string $coinId; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Total equity |
||
| 25 | * @var float |
||
| 26 | */ |
||
| 27 | private float $total; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Available balance |
||
| 31 | * @var float |
||
| 32 | */ |
||
| 33 | private float $free; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Reserved for orders |
||
| 37 | * @var bool |
||
| 38 | */ |
||
| 39 | private bool $locked; |
||
| 40 | |||
| 41 | public function __construct(array $data) |
||
| 42 | { |
||
| 43 | $this->coin = $data['coin']; |
||
| 44 | $this->coinId = $data['coinId']; |
||
| 45 | $this->free = $data['free']; |
||
| 46 | $this->total = $data['total']; |
||
| 47 | $this->locked = $data['locked']; |
||
| 48 | } |
||
| 49 | |||
| 50 | /** |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function getCoin(): string |
||
| 54 | { |
||
| 55 | return $this->coin; |
||
| 56 | } |
||
| 57 | |||
| 58 | /** |
||
| 59 | * @return string |
||
| 60 | */ |
||
| 61 | public function getCoinId(): string |
||
| 62 | { |
||
| 63 | return $this->coinId; |
||
| 64 | } |
||
| 65 | |||
| 66 | /** |
||
| 67 | * @return float |
||
| 68 | */ |
||
| 69 | public function getTotal(): float |
||
| 70 | { |
||
| 71 | return $this->total; |
||
| 72 | } |
||
| 73 | |||
| 74 | /** |
||
| 75 | * @return float |
||
| 76 | */ |
||
| 77 | public function getFree(): float |
||
| 78 | { |
||
| 79 | return $this->free; |
||
| 80 | } |
||
| 81 | |||
| 82 | /** |
||
| 83 | * @return bool |
||
| 84 | */ |
||
| 85 | public function getLocked(): bool |
||
| 88 | } |
||
| 89 | } |
||
| 90 |