Clients
extends ManagementEndpoint
in package
implements
ClientsInterface
Class Clients.
Handles requests to the Clients endpoint of the v2 Management API.
Tags
Interfaces, Classes, Traits and Enums
- ClientsInterface
- Interface ClientsInterface.
Table of Contents
- $httpClient : HttpClient
- __construct() : mixed
- ManagementEndpoint constructor.
- create() : ResponseInterface
- Create a new Client.
- delete() : ResponseInterface
- Delete a Client.
- get() : ResponseInterface
- Get a Client.
- getAll() : ResponseInterface
- Get all Clients.
- getHttpClient() : HttpClient
- Get the injected HttpClient instance.
- getLastRequest() : HttpRequest|null
- Return an instance of HttpRequest representing the last issued request.
- getResponsePaginator() : HttpResponsePaginator
- Return a ResponsePaginator instance configured for the last HttpRequest.
- instance() : static
- update() : ResponseInterface
- Update a Client.
Properties
$httpClient
private
HttpClient
$httpClient
Methods
__construct()
ManagementEndpoint constructor.
public
final __construct(HttpClient $httpClient) : mixed
Parameters
- $httpClient : HttpClient
-
httpClient instance to use
Return values
mixed —create()
Create a new Client.
public
create(string $name[, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface
Required scope: create:clients
.
Parameters
- $name : string
-
name of the new client
- $body : array<string|int, mixed>|null = null
-
Optional. Additional body content to pass with the API request. See @see for supported options.
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Return values
ResponseInterface —delete()
Delete a Client.
public
delete(string $id[, RequestOptions|null $options = null ]) : ResponseInterface
Required scope: `delete:clients".
Parameters
- $id : string
-
client (by it's ID) to delete
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Return values
ResponseInterface —get()
Get a Client.
public
get(string $id[, RequestOptions|null $options = null ]) : ResponseInterface
Required scopes:
-
read:clients
for any call to this endpoint. -
read:client_keys
to retrieve "client_secret" and "encryption_key" attributes.
Parameters
- $id : string
-
client (by it's ID) to query
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Return values
ResponseInterface —getAll()
Get all Clients.
public
getAll([array<string|int, mixed>|null $parameters = null ][, RequestOptions|null $options = null ]) : ResponseInterface
Required scopes:
-
read:clients
for any call to this endpoint. -
read:client_keys
to retrieve "client_secret" and "encryption_key" attributes.
Parameters
- $parameters : array<string|int, mixed>|null = null
-
Optional. Additional query parameters to pass with the API request. See @see for supported options.
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)
Return values
ResponseInterface —getHttpClient()
Get the injected HttpClient instance.
public
final getHttpClient() : HttpClient
Return values
HttpClient —getLastRequest()
Return an instance of HttpRequest representing the last issued request.
public
final getLastRequest() : HttpRequest|null
Return values
HttpRequest|null —getResponsePaginator()
Return a ResponsePaginator instance configured for the last HttpRequest.
public
final getResponsePaginator() : HttpResponsePaginator
Return values
HttpResponsePaginator —instance()
public
static instance(HttpClient $httpClient) : static
Parameters
- $httpClient : HttpClient
Return values
static —update()
Update a Client.
public
update(string $id[, array<string|int, mixed>|null $body = null ][, RequestOptions|null $options = null ]) : ResponseInterface
Required scopes:
-
update:clients
for any call to this endpoint. -
update:client_keys
to update "client_secret" and "encryption_key" attributes.
Parameters
- $id : string
-
client (by it's ID) to update
- $body : array<string|int, mixed>|null = null
-
Optional. Additional body content to pass with the API request. See @see for supported options.
- $options : RequestOptions|null = null
-
Optional. Additional request options to use, such as a field filtering or pagination. (Not all endpoints support these. See @see for supported options.)