class PreviewApiKey extends ApiKey

PreviewApiKey class.

This class represents a resource with type "PreviewApiKey" in Contentful.

Properties

protected ApiKey $sys from ApiKey
protected Client|null $client from BaseResource
protected string $name from ApiKey
protected string|null $description from ApiKey
protected string|null $accessToken from ApiKey
protected Link[] $environments from ApiKey

Methods

getId()

{@inheritdoc}

getType()

{@inheritdoc}

asLink()

{@inheritdoc}

mixed
asRequestBody()

Returns the resource in the form of request body.

setClient(Client $client)

Sets the current Client object instance.

getSystemProperties()

{@inheritdoc}

from ApiKey
string
getName()

No description

from ApiKey
setName(string $name)

No description

from ApiKey
string|null
getDescription()

No description

from ApiKey
setDescription(string $description)

No description

from ApiKey
string|null
getAccessToken()

No description

from ApiKey
jsonSerialize()

{@inheritdoc}

from ApiKey
setEnvironments(array $environments)

No description

from ApiKey
Link[]
getEnvironments()

No description

from ApiKey
addEnvironment(Link $environment)

No description

from ApiKey
string[]
asUriParameters()

Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.

Details

in BaseResource at line 37
getId()

{@inheritdoc}

in BaseResource at line 45
getType()

{@inheritdoc}

{@inheritdoc}

at line 33
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.

Return Value

mixed

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.

Parameters

Client $client

Return Value

BaseResource

in ApiKey at line 50
getSystemProperties()

{@inheritdoc}

in ApiKey at line 58
string getName()

Return Value

string

in ApiKey at line 68
ApiKey setName(string $name)

Parameters

string $name

Return Value

ApiKey

in ApiKey at line 78
string|null getDescription()

Return Value

string|null

in ApiKey at line 88
ApiKey setDescription(string $description)

Parameters

string $description

Return Value

ApiKey

in ApiKey at line 98
string|null getAccessToken()

Return Value

string|null

in ApiKey at line 106
jsonSerialize()

{@inheritdoc}

in ApiKey at line 122
ApiKey setEnvironments(array $environments)

Parameters

array $environments

Return Value

ApiKey

in ApiKey at line 132
Link[] getEnvironments()

Return Value

Link[]

in ApiKey at line 142
ApiKey addEnvironment(Link $environment)

Parameters

Link $environment

Return Value

ApiKey

at line 44
string[] asUriParameters()

Returns an associative array where keys are the name of the fragments in a URI, and the values are the corresponding IDs.

Return Value

string[]