php-rest-api icon indicating copy to clipboard operation
php-rest-api copied to clipboard

All child accounts are replaced by the last one

Open gronostajo opened this issue 3 years ago • 0 comments

The HTTP API returns:

[
  {
    "id": 11[…]29,
    "name": "qaTestAccount_shtHTn_b4dce"
  },
  {
    "id": 11[…]89,
    "name": "qaTestAccount_NbQCnM_b751a"
  },
  // …
  {
    "id": 11[…]99,
    "name": "qaTestAccount_GwrUNJ_35f37"
  }
]

But PHP API:

$list = $sdk->partnerAccounts->getList();
var_export($list);
array (
  0 => 
  MessageBird\Objects\PartnerAccount\Account::__set_state(array(
     'id' => 11[…]99,
     'name' => 'qaTestAccount_GwrUNJ_35f37',
     'email' => NULL,
     'accessKeys' => 
    array (
    ),
     'signingKey' => NULL,
  )),
  1 => 
  MessageBird\Objects\PartnerAccount\Account::__set_state(array(
     'id' => 11[…]99,
     'name' => 'qaTestAccount_GwrUNJ_35f37',
     'email' => NULL,
     'accessKeys' => 
    array (
    ),
     'signingKey' => NULL,
  )),
  // …
  22 => 
  MessageBird\Objects\PartnerAccount\Account::__set_state(array(
     'id' => 11[…]99,
     'name' => 'qaTestAccount_GwrUNJ_35f37',
     'email' => NULL,
     'accessKeys' => 
    array (
    ),
     'signingKey' => NULL,
  )),
)

It's the same object returned n times ($list[0] === $list[22]).

gronostajo avatar Jun 21 '22 07:06 gronostajo