PersonalAccessToken
class PersonalAccessToken extends BaseResource implements CreatableInterface
PersonalAccessToken class.
This class represents a resource with type "PersonalAccessToken" in Contentful.
Properties
protected PersonalAccessToken | $sys | ||
protected Client|null | $client | from BaseResource | |
protected string | $name | ||
protected DateTimeImmutable|null | $revokedAt | ||
protected bool | $isReadOnly | ||
protected string|null | $token |
Methods
Returns the resource in the form of request body.
PersonalAccessToken constructor.
{@inheritdoc}
{@inheritdoc}
Returns an array of headers that the current resource needs to sent for being created.
Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.
Revokes the personal access token.
No description
No description
No description
No description
No description
No description
Details
in BaseResource at line 37
getId()
{@inheritdoc}
in BaseResource at line 45
getType()
{@inheritdoc}
in BaseResource at line 53
asLink()
{@inheritdoc}
at line 92
mixed
asRequestBody()
Returns the resource in the form of request body.
This can differ from regular serialization, as some fields may not be present in the request payload.
in BaseResource at line 79
BaseResource
setClient(Client $client)
Sets the current Client object instance.
This is done automatically when performing API calls, so it shouldn't be used manually.
at line 59
__construct(string $name = '', bool $isReadOnly = \false)
PersonalAccessToken constructor.
at line 68
getSystemProperties()
{@inheritdoc}
at line 76
jsonSerialize()
{@inheritdoc}
at line 106
string[]
getHeadersForCreation()
Returns an array of headers that the current resource needs to sent for being created.
This method is supposed to be overridden if necessary.
at line 114
string[]
asUriParameters()
Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.
at line 126
revoke()
Revokes the personal access token.