Skip to content

Commit 75e457c

Browse files
committed
Rendering booked account balance from XML
1 parent 0484403 commit 75e457c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/AqBanking/ContextXmlRenderer.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,18 @@ public function getTransactions()
7575
return $transactions;
7676
}
7777

78+
/**
79+
* @return Money
80+
*/
81+
public function getBalance()
82+
{
83+
$statusNode = $this->domDocument->getElementsByTagName('bookedBalance')->item(0);
84+
85+
return $this->renderMoneyElement(
86+
$this->xPath->query('value', $statusNode)->item(0)
87+
);
88+
}
89+
7890
/**
7991
* @param \DOMNodeList $nodes
8092
* @throws \RuntimeException

0 commit comments

Comments
 (0)