UserOrganizationMembership
in package
implements
JsonSerializable
uses
JsonSerializableTrait
Table of Contents
Interfaces
- JsonSerializable
Properties
- $createdAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $customAttributes : array<string, mixed>|null
- An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked.
- $directoryManaged : bool
- Whether this organization membership is managed by a directory sync connection.
- $id : string
- The unique ID of the organization membership.
- $object : string
- Distinguishes the organization membership object.
- $organizationId : string
- The ID of the organization which the user belongs to.
- $organizationName : string|null
- The name of the organization which the user belongs to.
- $role : SlimRole
- The primary role assigned to the user within the organization.
- $status : OrganizationMembershipStatus
- The status of the organization membership. One of `active`, `inactive`, or `pending`.
- $updatedAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $userId : string
- The ID of the user.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$createdAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$createdAt
$customAttributes
An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked.
public
array<string, mixed>|null
$customAttributes
= null
$directoryManaged
Whether this organization membership is managed by a directory sync connection.
public
bool
$directoryManaged
$id
The unique ID of the organization membership.
public
string
$id
$object
Distinguishes the organization membership object.
public
string
$object
$organizationId
The ID of the organization which the user belongs to.
public
string
$organizationId
$organizationName
The name of the organization which the user belongs to.
public
string|null
$organizationName
= null
$role
The primary role assigned to the user within the organization.
public
SlimRole
$role
$status
The status of the organization membership. One of `active`, `inactive`, or `pending`.
public
OrganizationMembershipStatus
$status
$updatedAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$updatedAt
$userId
The ID of the user.
public
string
$userId
Methods
__construct()
public
__construct(string $object, string $id, string $userId, string $organizationId, OrganizationMembershipStatus $status, bool $directoryManaged, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt, SlimRole $role[, string|null $organizationName = null ][, array<string|int, mixed>|null $customAttributes = null ]) : mixed
Parameters
- $object : string
- $id : string
- $userId : string
- $organizationId : string
- $status : OrganizationMembershipStatus
- $directoryManaged : bool
- $createdAt : DateTimeImmutable
- $updatedAt : DateTimeImmutable
- $role : SlimRole
- $organizationName : string|null = null
- $customAttributes : array<string|int, mixed>|null = null
fromArray()
public
static fromArray(array<string|int, mixed> $data) : self
Parameters
- $data : array<string|int, mixed>
Return values
selfjsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>toArray()
public
toArray() : array<string|int, mixed>