Closed Tantuss closed 4 years ago
Steps to reproduce:
Small piece of PHP code: $monetaryAccounts = MonetaryAccount::listing()->getValue(); foreach ($monetaryAccounts as $monetaryAccount) { $account = $monetaryAccount->getMonetaryAccountBank(); $balance = $account->getBalance()->getValue(); }
This '$account->getBalance()' is already returning NULL, so the getValue() is generating an error.
Hello!
This code works on my machine, it returns the balances of all active monetary accounts:
$monetaryAccountList = MonetaryAccountBank::listing([])->getValue();
foreach ($monetaryAccountList as $monetaryAccount) {
if ($monetaryAccount->getStatus() === 'ACTIVE') {
echo $monetaryAccount->getBalance()->getValue() . '<br/>';
}
}
Is it possible to do some setting in the app to hide your balance in the API?
Is it possible to do some setting in the app to hide your balance in the API?
Nope, your account balances are always visible via the API
I tried with another Bunq account, then it works fine. I attached the debugger and then I really see that the balance value is null, so it looks like it's some issue in the Bunq API and not in this library.
I think it's some security issue, I will send a detailed report how to reproduce directly to the support of Bunq. So their tech support can look into it.
Steps to reproduce:
Small piece of PHP code: $monetaryAccounts = MonetaryAccount::listing()->getValue(); foreach ($monetaryAccounts as $monetaryAccount) { $account = $monetaryAccount->getMonetaryAccountBank(); $balance = $account->getBalance()->getValue(); }
This '$account->getBalance()' is already returning NULL, so the getValue() is generating an error.
What should happen:
What happens:
SDK version and environment