class DeliveryApiKey extends ApiKey implements CreatableInterface

DeliveryApiKey class.

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

Traits

DeletableTrait.
UpdatableTrait.

Properties

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

Methods

string
getId()

{@inheritdoc}

string
getType()

{@inheritdoc}

Link
asLink()

{@inheritdoc}

mixed
asRequestBody()

Returns the resource in the form of request body.

setClient(Client $client)

Sets the current Client object instance.

VersionableSystemPropertiesInterface
getSystemProperties()

No description

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
array
jsonSerialize()

{@inheritdoc}

setEnvironments(array $environments)

No description

from ApiKey
array
getEnvironments()

No description

from ApiKey
addEnvironment(Link $environment)

No description

from ApiKey
delete()

Deletes the current resource.

update()

Updates the current resource.

__construct(string $name = '')

ApiKey constructor.

array
asUriParameters()

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

array
getHeadersForCreation()

Returns an array of headers that the current resource needs to sent for being created.

Link
getPreviewApiKey()

No description

Details

in BaseResource at line 37
string getId()

{@inheritdoc}

Return Value

string

in BaseResource at line 45
string getType()

{@inheritdoc}

Return Value

string

{@inheritdoc}

Return Value

Link

at line 61
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 UpdatableTrait at line 26
VersionableSystemPropertiesInterface getSystemProperties()

Return Value

VersionableSystemPropertiesInterface

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

at line 50
array jsonSerialize()

{@inheritdoc}

Return Value

array

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

Parameters

array $environments

Return Value

ApiKey

in ApiKey at line 132
array getEnvironments()

Return Value

array

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

Parameters

Link $environment

Return Value

ApiKey

in DeletableTrait at line 28
delete()

Deletes the current resource.

in UpdatableTrait at line 40
update()

Updates the current resource.

at line 42
__construct(string $name = '')

ApiKey constructor.

Parameters

string $name

at line 79
array 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

array

at line 90
array 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.

Return Value

array

at line 98
Link getPreviewApiKey()

Return Value

Link