Documentation

ApiClient
in package

ApiClient Class Doc Comment

Tags
category

Class

author

Swagger Codegen team

link
https://github.com/swagger-api/swagger-codegen

Table of Contents

$DELETE  : mixed
$GET  : mixed
$GRANT_TYPE_JWT  : mixed
$HEAD  : mixed
$OPTIONS  : mixed
$PATCH  : mixed
$POST  : mixed
$PUT  : mixed
$SCOPE_EXTENDED  : mixed
$SCOPE_IMPERSONATION  : mixed
$SCOPE_SIGNATURE  : mixed
$config  : Configuration
Configuration
$oAuth  : OAuth
oAuth \DocuSign\eSign\Client\ApiException
$serializer  : ObjectSerializer
Object Serializer
__construct()  : mixed
Constructor of the class
callApi()  : mixed
Make the HTTP call (Sync)
generateAccessToken()  : array<string|int, mixed>
GenerateAccessToken will exchange the authorization code for an access token and refresh tokens.
getApiKeyWithPrefix()  : string
Get API key (with prefix if set)
getAuthorizationURI()  : string
Helper method to configure the OAuth accessCode/implicit flow parameters
getConfig()  : Configuration
Get the config
getOAuth()  : OAuth
Get the oAuth
getSerializer()  : ObjectSerializer
Get the serializer
getUserInfo()  : array<string|int, mixed>
Get User Info method takes the accessToken to retrieve User Account Data.
refreshAccessToken()  : array<string|int, mixed>
Refresh Access Token
requestJWTApplicationToken()  : array<string|int, mixed>
Request JWT Application Token
requestJWTUserToken()  : array<string|int, mixed>
Request JWT User Token
selectHeaderAccept()  : string
Return the header 'Accept' based on an array of Accept provided
selectHeaderContentType()  : string
Return the content type based on an array of content-type provided
httpParseHeaders()  : array<string|int, string>
Return an array of HTTP response headers

Properties

$DELETE

public static mixed $DELETE = "DELETE"

$GRANT_TYPE_JWT

public static mixed $GRANT_TYPE_JWT = "urn:ietf:params:oauth:grant-type:jwt-bearer"

$OPTIONS

public static mixed $OPTIONS = "OPTIONS"

$SCOPE_EXTENDED

public static mixed $SCOPE_EXTENDED = "extended"

$SCOPE_IMPERSONATION

public static mixed $SCOPE_IMPERSONATION = "impersonation"

$SCOPE_SIGNATURE

public static mixed $SCOPE_SIGNATURE = "signature"

$oAuth

oAuth \DocuSign\eSign\Client\ApiException

protected OAuth $oAuth

Methods

__construct()

Constructor of the class

public __construct([Configuration $config = null ][, OAuth $oAuth = null ]) : mixed
Parameters
$config : Configuration = null

Rest API config for this ApiClient

$oAuth : OAuth = null

OAuth config for this ApiClient

Return values
mixed

callApi()

Make the HTTP call (Sync)

public callApi(string $resourcePath, string $method, array<string|int, mixed> $queryParams, array<string|int, mixed> $postData, array<string|int, mixed> $headerParams[, string $responseType = null ][, string $endpointPath = null ][, bool $oAuth = false ]) : mixed
Parameters
$resourcePath : string

path to method endpoint

$method : string

method to call

$queryParams : array<string|int, mixed>

parameters to be place in query URL

$postData : array<string|int, mixed>

parameters to be placed in POST body

$headerParams : array<string|int, mixed>

parameters to be place in request header

$responseType : string = null

expected response type of the endpoint

$endpointPath : string = null

path to method endpoint before expanding parameters

$oAuth : bool = false

pass true in case of oAuth requests

Tags
throws
ApiException

on a non 2xx response

Return values
mixed

generateAccessToken()

GenerateAccessToken will exchange the authorization code for an access token and refresh tokens.

public generateAccessToken([string $client_id = null ][, string $client_secret = null ][, string $code = null ]) : array<string|int, mixed>
Parameters
$client_id : string = null

DocuSign OAuth Client Id(AKA Integrator Key)

$client_secret : string = null

The secret key you generated when you set up the integration in DocuSign Admin console.

$code : string = null

The authorization code

Tags
throws
ApiException
throws
InvalidArgumentException
Return values
array<string|int, mixed>

getApiKeyWithPrefix()

Get API key (with prefix if set)

public getApiKeyWithPrefix(string $apiKeyIdentifier) : string
Parameters
$apiKeyIdentifier : string

name of apikey

Return values
string

API key with the prefix

getAuthorizationURI()

Helper method to configure the OAuth accessCode/implicit flow parameters

public getAuthorizationURI(string $client_id, string|array<string|int, mixed> $scopes, string $redirect_uri, string $response_type[, string $state = null ]) : string
Parameters
$client_id : string

DocuSign OAuth Client Id(AKA Integrator Key)

$scopes : string|array<string|int, mixed>

the list of requested scopes. Client applications may be scoped to a limited set of system access.

$redirect_uri : string

This determines where to deliver the response containing the authorization code

$response_type : string

Determines the response type of the authorization request, NOTE: these response types are mutually exclusive for a client application. A public/native client application may only request a response type of "token". A private/trusted client application may only request a response type of "code".

$state : string = null

Allows for arbitrary state that may be useful to your application. The value in this parameter will be round-tripped along with the response so you can make sure it didn't change. Will be round-tripped along with the response so you can make sure it didn't change.

Return values
string

getUserInfo()

Get User Info method takes the accessToken to retrieve User Account Data.

public getUserInfo( $access_token) : array<string|int, mixed>
Parameters
$access_token :
Tags
throws
ApiException
Return values
array<string|int, mixed>

refreshAccessToken()

Refresh Access Token

public refreshAccessToken([string $client_id = null ][, string $client_secret = null ][, mixed $refresh_token = null ]) : array<string|int, mixed>
Parameters
$client_id : string = null

DocuSign OAuth Client Id(AKA Integrator Key)

$client_secret : string = null

The secret key you generated when you set up the integration in DocuSign Admin console.

$refresh_token : mixed = null
Tags
throws
ApiException
throws
InvalidArgumentException
Return values
array<string|int, mixed>

requestJWTApplicationToken()

Request JWT Application Token

public requestJWTApplicationToken(string $client_id, string $rsa_private_key[, string|array<string|int, string> $scopes = null ][, int $expires_in = 60 ]) : array<string|int, mixed>
Parameters
$client_id : string

DocuSign OAuth Client Id(AKA Integrator Key)

$rsa_private_key : string

the RSA private key

$scopes : string|array<string|int, string> = null

array optional The list of requested scopes may include (but not limited to) You can also pass any advanced scope.

$expires_in : int = 60

int Number of minutes token will be valid

Tags
throws
ApiException
Return values
array<string|int, mixed>

requestJWTUserToken()

Request JWT User Token

public requestJWTUserToken(string $client_id, string $user_id, string $rsa_private_key[, string|array<string|int, string> $scopes = null ][, int $expires_in = 60 ]) : array<string|int, mixed>
Parameters
$client_id : string

DocuSign OAuth Client Id(AKA Integrator Key)

$user_id : string
$rsa_private_key : string

the RSA private key

$scopes : string|array<string|int, string> = null

array optional The list of requested scopes may include (but not limited to) You can also pass any advanced scope.

$expires_in : int = 60

Number of minutes token will be valid

Tags
throws
ApiException
throws
InvalidArgumentException
Return values
array<string|int, mixed>

selectHeaderAccept()

Return the header 'Accept' based on an array of Accept provided

public selectHeaderAccept(array<string|int, string> $accept) : string
Parameters
$accept : array<string|int, string>

Array of header

Return values
string

Accept (e.g. application/json)

selectHeaderContentType()

Return the content type based on an array of content-type provided

public selectHeaderContentType(array<string|int, string> $content_type) : string
Parameters
$content_type : array<string|int, string>

Array fo content-type

Return values
string

Content-Type (e.g. application/json)

httpParseHeaders()

Return an array of HTTP response headers

protected httpParseHeaders(string $raw_headers) : array<string|int, string>
Parameters
$raw_headers : string

A string of raw HTTP response headers

Return values
array<string|int, string>

Array of HTTP response heaers

Search results