WorkOS PHP SDK

AssignRole
in package
implements JsonSerializable uses JsonSerializableTrait

Read onlyYes

Table of Contents

Interfaces

JsonSerializable

Properties

$resourceExternalId  : string|null
The external ID of the resource. Required with `resource_type_slug`. Mutually exclusive with `resource_id`.
$resourceId  : string|null
The ID of the resource. Mutually exclusive with `resource_external_id` and `resource_type_slug`.
$resourceTypeSlug  : string|null
The resource type slug. Required with `resource_external_id`. Mutually exclusive with `resource_id`.
$roleSlug  : string
The slug of the role to assign.

Methods

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

Properties

$resourceExternalId

The external ID of the resource. Required with `resource_type_slug`. Mutually exclusive with `resource_id`.

public string|null $resourceExternalId = null

$resourceId

The ID of the resource. Mutually exclusive with `resource_external_id` and `resource_type_slug`.

public string|null $resourceId = null

$resourceTypeSlug

The resource type slug. Required with `resource_external_id`. Mutually exclusive with `resource_id`.

public string|null $resourceTypeSlug = null

$roleSlug

The slug of the role to assign.

public string $roleSlug

Methods

__construct()

public __construct(string $roleSlug[, string|null $resourceId = null ][, string|null $resourceExternalId = null ][, string|null $resourceTypeSlug = null ]) : mixed
Parameters
$roleSlug : string
$resourceId : string|null = null
$resourceExternalId : 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>

toArray()

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

        
On this page

Search results