-
Notifications
You must be signed in to change notification settings - Fork 65
Closed
Description
Steps to reproduce:
- Have a joint account. In my case it's a closed one.
- Install tinker and run
./go-proto get a production config file - Run the attached piece of code within the tinker folder
What should happen:
- It lists the monetary accounts without a problem
What happens:
- Decoding the response fails, apparently on one of the
LabelUserobjects within theCoOwnerobject of the joint account
Traceback
Fatal error: Uncaught TypeError: Argument 1 passed to bunq\Model\Core\BunqModel::createFromResponseArray() must be of the type array, string given, called in /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php on line 236 and defined in /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php:97
Stack trace:
#0 /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php(236): bunq\Model\Core\BunqModel::createFromResponseArray('[uuid here]...', NULL)
#1 /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php(201): bunq\Model\Core\BunqModel::createListFromResponseArray(Array)
#2 /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php(159): bunq\Model\Core\BunqModel::determineFieldContents(Object(ReflectionProperty), Array)
#3 /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php(113): bunq\Model\Core\BunqModel::createInstanceFromResponseArray(Array)
#4 /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model in /Users/mathijsb/tinkerbug/vendor/bunq/sdk_php/src/Model/Core/BunqModel.php on line 97
Sample code
<?php
use bunq\Context\ApiContext;
use bunq\Context\BunqContext;
use bunq\Model\Generated\Endpoint\MonetaryAccount;
require 'vendor/autoload.php';
// Config file produced via Tinker/go-pro. The code works fine when using 'bunq-sandbox.conf'.
$configPath = 'bunq-production.conf';
$apiContext = ApiContext::restore($configPath);
$apiContext->ensureSessionActive();
BunqContext::loadApiContext($apiContext);
$allAccount = MonetaryAccount::listing();SDK version and environment
- Tested on 0.13.1
- Production (problem occurs)
- Sandbox (problem can't occur because I have no joint accounts there and didn't bother to set them up)
Metadata
Metadata
Assignees
Labels
No labels