-
Notifications
You must be signed in to change notification settings - Fork 54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Balance is null #194
Comments
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? |
Nope, your account balances are always visible via the API |
I tried with another Bunq account, then it works fine. |
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
20200202.35+debian91 (cli)The text was updated successfully, but these errors were encountered: