Completed
Push — master ( 39a0bd...0a53a0 )
by Fabian
02:26
created

TradeBalanceResponse::getTradeBalance()   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 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace HanischIt\KrakenApi\Call\TradeBalance;
4
5
use HanischIt\KrakenApi\Model\ResponseInterface;
6
7
/**
8
 * Class TradeBalanceResponse
9
 * @package HanischIt\KrakenApi\Call\TradeBalance
10
 */
11
class TradeBalanceResponse implements ResponseInterface
12
{
13
    /**
14
     * @var float
15
     */
16
    private $equivavlentBalance;
17
    /**
18
     * @var float
19
     */
20
    private $tradeBalance;
21
    /**
22
     * @var float
23
     */
24
    private $marginAmount;
25
    /**
26
     * @var float
27
     */
28
    private $unrealizedNetProfitLoss;
29
    /**
30
     * @var float
31
     */
32
    private $costBasis;
33
    /**
34
     * @var float
35
     */
36
    private $currentFloatingValuation;
37
    /**
38
     * @var float
39
     */
40
    private $equity;
41
    /**
42
     * @var float
43
     */
44
    private $freeMargin;
45
46
47
    /**
48
     * @param array $data
49
     */
50 1
    public function manualMapping($data)
51
    {
52 1
        $this->equivavlentBalance = $data["eb"];
53 1
        $this->tradeBalance = $data["tb"];
54 1
        $this->marginAmount = $data["m"];
55 1
        $this->unrealizedNetProfitLoss = $data["n"];
56 1
        $this->costBasis = $data["c"];
57 1
        $this->currentFloatingValuation = $data["v"];
58 1
        $this->equity = $data["e"];
59 1
        $this->freeMargin = $data["mf"];
60 1
    }
61
62
    /**
63
     * @return float
64
     */
65 1
    public function getEquivavlentBalance()
66
    {
67 1
        return $this->equivavlentBalance;
68
    }
69
70
    /**
71
     * @return float
72
     */
73 1
    public function getTradeBalance()
74
    {
75 1
        return $this->tradeBalance;
76
    }
77
78
    /**
79
     * @return float
80
     */
81 1
    public function getMarginAmount()
82
    {
83 1
        return $this->marginAmount;
84
    }
85
86
    /**
87
     * @return float
88
     */
89 1
    public function getUnrealizedNetProfitLoss()
90
    {
91 1
        return $this->unrealizedNetProfitLoss;
92
    }
93
94
    /**
95
     * @return float
96
     */
97 1
    public function getCostBasis()
98
    {
99 1
        return $this->costBasis;
100
    }
101
102
    /**
103
     * @return float
104
     */
105 1
    public function getCurrentFloatingValuation()
106
    {
107 1
        return $this->currentFloatingValuation;
108
    }
109
110
    /**
111
     * @return float
112
     */
113 1
    public function getEquity()
114
    {
115 1
        return $this->equity;
116
    }
117
118
    /**
119
     * @return float
120
     */
121 1
    public function getFreeMargin()
122
    {
123 1
        return $this->freeMargin;
124
    }
125
}
126