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

Message 'id' and 'href' missing in $MessageBird->messages->getList() response

Open stgoos opened this issue 3 years ago • 0 comments

When I retieve the list of messages I don't see the ["id":protected] and the ["href":protected] information in the response like it's shown in the documentation (https://developers.messagebird.com/api/sms-messaging/#list-messages):

object(MessageBirdObjectsBaseList)#128 (6) {
  ["limit"]=>
  int(30)
  ["offset"]=>
  int(0)
  ["count"]=>
  int(18)
  ["totalCount"]=>
  int(18)
  ["links"]=>
  object(stdClass)#55 (4) {
    ["first"]=>
    string(56) "https://rest.messagebird.com/messages/?offset=0&limit=30"
    ["previous"]=>
    NULL
    ["next"]=>
    NULL
    ["last"]=>
    string(56) "https://rest.messagebird.com/messages/?offset=0&limit=30"
  }
  ["items"]=>
  array(1) {
    [0]=>
    object(MessageBirdObjectsMessage)#123 (16) {
      ["id":protected]=>
      string(32) "7f6526d794ac4cd1bdb262d86356d341"
      ["href":protected]=>
      string(70) "https://rest.messagebird.com/messages/7f6526d794ac4cd1bdb262d86356d341"
      ["direction"]=>
      string(2) "mt"

The response I receive starts with the ["direction"] information for each of the items (=messages).

Is something broken? Or am I doing something wrong?

I'm using:

$MessageList = $MessageBird->messages->getList(array ('offset' => 0, 'limit' => 30));
var_dump($MessageList);

to get hold of the list with messages.

I'm using v2.0.1 of the php-rest-api.

stgoos avatar Jul 22 '21 22:07 stgoos