diff --git a/src/Response/IdeResponse.php b/src/Response/IdeResponse.php index 69209c87..4910db9b 100644 --- a/src/Response/IdeResponse.php +++ b/src/Response/IdeResponse.php @@ -24,6 +24,6 @@ public function __construct($ide) $this->uuid = $ide->uuid; $this->label = $ide->label; $this->links = $ide->_links; - $this->owner = $ide->_embedded->owner; + $this->owner = new MemberResponse($ide->_embedded->owner); } } diff --git a/tests/Fixtures/Endpoints/Ides/getAllIdes.json b/tests/Fixtures/Endpoints/Ides/getAllIdes.json index c044816e..2eb52d6b 100644 --- a/tests/Fixtures/Endpoints/Ides/getAllIdes.json +++ b/tests/Fixtures/Endpoints/Ides/getAllIdes.json @@ -29,8 +29,20 @@ "ide": { "href": "https://215824ff-272a-4a8c-9027-df32ed1d68a9.ides.acquia.com" } + }, + "_embedded": { + "owner": { + "uuid": "10be1d3e-f2b4-4d34-855d-321df3938ffd", + "first_name": "First", + "last_name": "Last", + "last_login_at": "2019-01-31T10:53:11-05:00", + "created_at": "2016-08-14T17:38:59-04:00", + "email": "user.name@example.com", + "picture_url": "https://accounts.acquia.com/path/to/image.png", + "username": "user.name" + } } } ] } -} \ No newline at end of file +} diff --git a/tests/Fixtures/Endpoints/Ides/getIde.json b/tests/Fixtures/Endpoints/Ides/getIde.json index 0201fef6..2d3c295d 100644 --- a/tests/Fixtures/Endpoints/Ides/getIde.json +++ b/tests/Fixtures/Endpoints/Ides/getIde.json @@ -16,6 +16,18 @@ }, "ide": { "href": "https://215824ff-272a-4a8c-9027-df32ed1d68a9.ides.acquia.com" + }, + "_embedded": { + "owner": { + "uuid": "10be1d3e-f2b4-4d34-855d-321df3938ffd", + "first_name": "First", + "last_name": "Last", + "last_login_at": "2019-01-31T10:53:11-05:00", + "created_at": "2016-08-14T17:38:59-04:00", + "email": "user.name@example.com", + "picture_url": "https://accounts.acquia.com/path/to/image.png", + "username": "user.name" + } } } -} \ No newline at end of file +}