WorkOS PHP SDK

ListData
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$createdAt  : DateTimeImmutable
An ISO 8601 timestamp.
$description  : string|null
An optional description of the role.
$id  : string
Unique identifier of the role.
$name  : string
A descriptive name for the role.
$object  : string
Distinguishes the role object.
$permissions  : array<string|int, string>
The permission slugs assigned to the role.
$resourceTypeSlug  : string
The slug of the resource type the role is scoped to.
$slug  : string
A unique slug for the role.
$type  : RoleType
Whether the role is scoped to the environment or an organization.
$updatedAt  : DateTimeImmutable
An ISO 8601 timestamp.

Methods

__construct()  : mixed
fromArray()  : self
jsonSerialize()  : array<string|int, mixed>
toArray()  : array<string|int, mixed>

Properties

$createdAt

An ISO 8601 timestamp.

public DateTimeImmutable $createdAt

$description

An optional description of the role.

public string|null $description

$id

Unique identifier of the role.

public string $id

$name

A descriptive name for the role.

public string $name

$object

Distinguishes the role object.

public string $object

$permissions

The permission slugs assigned to the role.

public array<string|int, string> $permissions

$resourceTypeSlug

The slug of the resource type the role is scoped to.

public string $resourceTypeSlug

$slug

A unique slug for the role.

public string $slug

$type

Whether the role is scoped to the environment or an organization.

public RoleType $type

$updatedAt

An ISO 8601 timestamp.

public DateTimeImmutable $updatedAt

Methods

__construct()

public __construct(string $slug, string $object, string $id, string $name, string|null $description, RoleType $type, string $resourceTypeSlug, array<string|int, mixed> $permissions, DateTimeImmutable $createdAt, DateTimeImmutable $updatedAt) : mixed
Parameters
$slug : string
$object : string
$id : string
$name : string
$description : string|null
$type : RoleType
$resourceTypeSlug : string
$permissions : array<string|int, mixed>
$createdAt : DateTimeImmutable
$updatedAt : DateTimeImmutable

fromArray()

public static fromArray(array<string|int, mixed> $data) : self
Parameters
$data : array<string|int, mixed>
Return values
self

jsonSerialize()

public jsonSerialize() : array<string|int, mixed>
Return values
array<string|int, mixed>

toArray()

public toArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

        
On this page

Search results