WorkOS PHP SDK

CreateOrganizationRole
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$description  : string|null
An optional description of the role's purpose.
$name  : string
A descriptive name for the role.
$resourceTypeSlug  : string|null
The slug of the resource type the role is scoped to.
$slug  : string|null
A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix.

Methods

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

Properties

$description

An optional description of the role's purpose.

public string|null $description = null

$resourceTypeSlug

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

public string|null $resourceTypeSlug = null

$slug

A unique identifier for the role within the organization. When provided, must begin with 'org-' and contain only lowercase letters, numbers, hyphens, and underscores. When omitted, a slug is auto-generated from the role name and a random suffix.

public string|null $slug = null

Methods

__construct()

public __construct(string $name[, string|null $slug = null ][, string|null $description = null ][, string|null $resourceTypeSlug = null ]) : mixed
Parameters
$name : string
$slug : string|null = null
$description : string|null = null
$resourceTypeSlug : string|null = null

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>

        
On this page

Search results