InvitationCreatedData
in package
implements
JsonSerializable
uses
JsonSerializableTrait
The event payload.
Table of Contents
Interfaces
- JsonSerializable
Properties
- $acceptedAt : DateTimeImmutable|null
- The timestamp when the invitation was accepted, or null if not yet accepted.
- $acceptedUserId : string|null
- The ID of the user who accepted the invitation, once accepted.
- $createdAt : DateTimeImmutable
- An ISO 8601 timestamp.
- $email : string
- The email address of the recipient.
- $expiresAt : DateTimeImmutable
- The timestamp when the invitation expires.
- $id : string
- The unique ID of the invitation.
- $inviterUserId : string|null
- The ID of the user who invited the recipient, if provided.
- $object : string
- Distinguishes the invitation object.
- $organizationId : string|null
- The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
- $revokedAt : DateTimeImmutable|null
- The timestamp when the invitation was revoked, or null if not revoked.
- $roleSlug : string|null
- Slug of the role the invitee will be assigned on acceptance. Reflects the current role on the invitee's organization membership. null when the invitation has no associated organization.
- $state : UserInviteState
- The state of the invitation.
- $updatedAt : DateTimeImmutable
- An ISO 8601 timestamp.
Methods
- __construct() : mixed
- fromArray() : self
- jsonSerialize() : array<string|int, mixed>
- toArray() : array<string|int, mixed>
Properties
$acceptedAt
The timestamp when the invitation was accepted, or null if not yet accepted.
public
DateTimeImmutable|null
$acceptedAt
$acceptedUserId
The ID of the user who accepted the invitation, once accepted.
public
string|null
$acceptedUserId
$createdAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$createdAt
The email address of the recipient.
public
string
$email
$expiresAt
The timestamp when the invitation expires.
public
DateTimeImmutable
$expiresAt
$id
The unique ID of the invitation.
public
string
$id
$inviterUserId
The ID of the user who invited the recipient, if provided.
public
string|null
$inviterUserId
$object
Distinguishes the invitation object.
public
string
$object
$organizationId
The ID of the [organization](https://workos.com/docs/reference/organization) that the recipient will join.
public
string|null
$organizationId
$revokedAt
The timestamp when the invitation was revoked, or null if not revoked.
public
DateTimeImmutable|null
$revokedAt
$roleSlug
Slug of the role the invitee will be assigned on acceptance. Reflects the current role on the invitee's organization membership. null when the invitation has no associated organization.
public
string|null
$roleSlug
$state
The state of the invitation.
public
UserInviteState
$state
$updatedAt
An ISO 8601 timestamp.
public
DateTimeImmutable
$updatedAt
Methods
__construct()
public
__construct(string $object, string $id, string $email, UserInviteState $state, DateTimeImmutable|null $acceptedAt, DateTimeImmutable|null $revokedAt, DateTimeImmutable $expiresAt, string|null $organizationId, string|null $inviterUserId, string|null $acceptedUserId, string|null $roleSlug, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt) : mixed
Parameters
- $object : string
- $id : string
- $email : string
- $state : UserInviteState
- $acceptedAt : DateTimeImmutable|null
- $revokedAt : DateTimeImmutable|null
- $expiresAt : DateTimeImmutable
- $organizationId : string|null
- $inviterUserId : string|null
- $acceptedUserId : string|null
- $roleSlug : string|null
- $createdAt : DateTimeImmutable
- $updatedAt : DateTimeImmutable
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>