Skip to content
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

Add profile_picture_url attribute to the user object #210

Merged
merged 4 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/Resource/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class User extends BaseWorkOSResource
"firstName",
"lastName",
"emailVerified",
"profilePictureUrl",
"createdAt",
"updatedAt"
];
Expand All @@ -27,6 +28,7 @@ class User extends BaseWorkOSResource
"first_name" => "firstName",
"last_name" => "lastName",
"email_verified" => "emailVerified",
"profile_picture_url" => "profilePictureUrl",
"created_at" => "createdAt",
"updated_at" => "updatedAt"
];
Expand Down
53 changes: 32 additions & 21 deletions tests/WorkOS/UserManagementTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -876,19 +876,21 @@ private function invitationListResponseFixture()
{
return json_encode(
[
"data" => [[
"object" => "invitation",
"id" => "invitation_01E4ZCR3C56J083X43JQXF3JK5",
"email" => "[email protected]",
"state" => "pending",
"accepted_at" => "2021-07-01T19:07:33.155Z",
"revoked_at" => "2021-07-01T19:07:33.155Z",
"expires_at" => "2021-07-01T19:07:33.155Z",
"token" => "Z1uX3RbwcIl5fIGJJJCXXisdI",
"organization_id" => "org_01EHQMYV6MBK39QC5PZXHY59C3",
"created_at" => "2021-07-01T19:07:33.155Z",
"updated_at" => "2021-07-01T19:07:33.155Z",
]],
"data" => [
[
"object" => "invitation",
"id" => "invitation_01E4ZCR3C56J083X43JQXF3JK5",
"email" => "[email protected]",
"state" => "pending",
"accepted_at" => "2021-07-01T19:07:33.155Z",
"revoked_at" => "2021-07-01T19:07:33.155Z",
"expires_at" => "2021-07-01T19:07:33.155Z",
"token" => "Z1uX3RbwcIl5fIGJJJCXXisdI",
"organization_id" => "org_01EHQMYV6MBK39QC5PZXHY59C3",
"created_at" => "2021-07-01T19:07:33.155Z",
"updated_at" => "2021-07-01T19:07:33.155Z",
]
],
"list_metadata" => [
"before" => null,
"after" => null
Expand All @@ -913,14 +915,16 @@ private function organizationMembershipListResponseFixture()
{
return json_encode(
[
"data" => [[
"object" => "organization_membership",
"id" => "om_01E4ZCR3C56J083X43JQXF3JK5",
"user_id" => "user_01H7X1M4TZJN5N4HG4XXMA1234",
"organization_id" => "org_01EHQMYV6MBK39QC5PZXHY59C3",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z",
]],
"data" => [
[
"object" => "organization_membership",
"id" => "om_01E4ZCR3C56J083X43JQXF3JK5",
"user_id" => "user_01H7X1M4TZJN5N4HG4XXMA1234",
"organization_id" => "org_01EHQMYV6MBK39QC5PZXHY59C3",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z",
]
],
"list_metadata" => [
"before" => null,
"after" => null
Expand Down Expand Up @@ -1001,6 +1005,7 @@ private function userResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
"profile_picture_url" => "https://example.com/photo.jpg",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
]
Expand All @@ -1018,6 +1023,7 @@ private function createUserAndTokenResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
'profile_picture_url' => 'https://example.com/photo.jpg',
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
]
Expand All @@ -1033,6 +1039,7 @@ private function createUserResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
'profile_picture_url' => 'https://example.com/photo.jpg',
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
]);
Expand All @@ -1055,6 +1062,7 @@ private function getUserResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
"profile_picture_url" => "https://example.com/photo.jpg",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
]);
Expand All @@ -1071,6 +1079,7 @@ private function listUsersResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
"profile_picture_url" => "https://example.com/photo.jpg",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
]
Expand Down Expand Up @@ -1099,6 +1108,7 @@ private function userFixture()
"firstName" => "Damien",
"lastName" => "Alabaster",
"emailVerified" => true,
"profilePictureUrl" => "https://example.com/photo.jpg",
"createdAt" => "2021-06-25T19:07:33.155Z",
"updatedAt" => "2021-06-25T19:07:33.155Z"
];
Expand All @@ -1114,6 +1124,7 @@ private function userAndOrgResponseFixture()
"first_name" => "Damien",
"last_name" => "Alabaster",
"email_verified" => true,
"profile_picture_url" => "https://example.com/photo.jpg",
"created_at" => "2021-06-25T19:07:33.155Z",
"updated_at" => "2021-06-25T19:07:33.155Z"
],
Expand Down
Loading