@@ 12-48 (lines=37) @@ | ||
9 | * Class LedgersInfoResponse |
|
10 | * @package HanischIt\KrakenApi\Model\Trades |
|
11 | */ |
|
12 | class LedgersInfoResponse implements ResponseInterface |
|
13 | { |
|
14 | /** |
|
15 | * @var LedgerInfoModel[] |
|
16 | */ |
|
17 | private $ledgerInfos; |
|
18 | ||
19 | /** |
|
20 | * @param array $result |
|
21 | */ |
|
22 | public function manualMapping($result) |
|
23 | { |
|
24 | foreach ($result as $ledgerId => $ledger) { |
|
25 | $this->ledgerInfos[] = new LedgerInfoModel( |
|
26 | $ledgerId, |
|
27 | $ledger['refid'], |
|
28 | $ledger['time'], |
|
29 | $ledger['type'], |
|
30 | $ledger['aclass'], |
|
31 | $ledger['asset'], |
|
32 | $ledger['amount'], |
|
33 | $ledger['fee'], |
|
34 | $ledger['balance'] |
|
35 | ); |
|
36 | } |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return LedgerInfoModel[] |
|
41 | */ |
|
42 | public function getLedgerInfos() |
|
43 | { |
|
44 | return $this->ledgerInfos; |
|
45 | } |
|
46 | ||
47 | ||
48 | } |
|
49 |
@@ 12-48 (lines=37) @@ | ||
9 | * Class QueryLedgersResponse |
|
10 | * @package HanischIt\KrakenApi\Call\QueryLedgers |
|
11 | */ |
|
12 | class QueryLedgersResponse implements ResponseInterface |
|
13 | { |
|
14 | /** |
|
15 | * @var LedgerInfoModel[] |
|
16 | */ |
|
17 | private $ledgerInfos; |
|
18 | ||
19 | /** |
|
20 | * @param array $result |
|
21 | */ |
|
22 | public function manualMapping($result) |
|
23 | { |
|
24 | foreach ($result as $ledgerId => $ledger) { |
|
25 | $this->ledgerInfos[] = new LedgerInfoModel( |
|
26 | $ledgerId, |
|
27 | $ledger['refid'], |
|
28 | $ledger['time'], |
|
29 | $ledger['type'], |
|
30 | $ledger['aclass'], |
|
31 | $ledger['asset'], |
|
32 | $ledger['amount'], |
|
33 | $ledger['fee'], |
|
34 | $ledger['balance'] |
|
35 | ); |
|
36 | } |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return LedgerInfoModel[] |
|
41 | */ |
|
42 | public function getLedgerInfos() |
|
43 | { |
|
44 | return $this->ledgerInfos; |
|
45 | } |
|
46 | ||
47 | ||
48 | } |
|
49 |