From aa957b0a59bf41b8bd72cc19add773a5026bba0e Mon Sep 17 00:00:00 2001 From: Dhaval Brahmbhatt <32913565+dbbrahmbhatt@users.noreply.github.com> Date: Thu, 2 Apr 2020 11:44:37 -0700 Subject: [PATCH] Version 5.1.0-v2.1-20.1.00 (#94) * Version 5.1.0-v2.1-20.1.00 * corrected date Co-authored-by: Dhaval Brahmbhatt --- .travis.yml | 2 +- CHANGELOG.md | 18 +- src/Api/ConnectApi.php | 358 ----------------------------------- src/Api/OrganizationsApi.php | 200 ------------------- src/Client/ApiClient.php | 77 +++----- src/Configuration.php | 4 +- 6 files changed, 37 insertions(+), 622 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d6d320f..e33f2cca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,5 +9,5 @@ php: - 5.5 - 5.6 - 7.0 -before_install: "composer install --ignore-platform-reqs" +before_install: "travis_wait 30 composer install --ignore-platform-reqs" script: "cd test && phpunit UnitTests.php && phpunit OAuthTests.php" diff --git a/CHANGELOG.md b/CHANGELOG.md index 67bd64b2..3c31046c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,17 @@ -# Change Log +# DocuSign PHP Client Change Log All notable changes to this project will be documented in this file. See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for Product Release Notes. -## [5.1.0] - eSignature API v2.1-20.1.00 - 2020-03-13 +## [5.1.0] - eSignature API v2.1-20.1.00 - 2020-03-30 ### Changed -* The SDK now supports version v2.1-20.1.00 of the DocuSign eSignature API. -* SDK Release Version updated.git chec + +* Added support for version v2.1-20.1.00 of the DocuSign eSignature API. +* Updated the SDK release version. + +### Added + +* Added the new property `copy_recipient_data` to envelopes. When set to **true**, the information that recipients enter is retained when you clone an envelope. For example, if you resend an envelope that was declined or voided after one or more recipients entered data, that data is retained. Note that the new account UI setting `enable_envelope_copy_with_data` must be enabled for the account. +* Added `input_options` and `RecipientIdentityInputOption` to `RecipientIdentityVerification` to support Identity Verification: Reserved for DocuSign. ## [5.0.0] - eSignature API v2-19.2.02 - 2019-09-28 ### Changed @@ -28,11 +34,11 @@ See [DocuSign Support Center](https://support.docusign.com/en/releasenotes/) for * OAuthTests.php for OAuth support test ### Fixed * A bug with that could cause the *moveEnvelopes* method call to return a response without a *Content-Type* header. (DCM-2871) - + ## [3.0.1] - Fixed the composer version - 2017-10-25 ## [3.0.0] - Published all the DocuSign API endpoints - 2017-03-15 ## [2.0.0] - New shiny PHP client - 2017-12-05 -## [1.0.0] - Old legacy version - 2016-02-18 \ No newline at end of file +## [1.0.0] - Old legacy version - 2016-02-18 diff --git a/src/Api/ConnectApi.php b/src/Api/ConnectApi.php index d4957cf0..f9154fd1 100644 --- a/src/Api/ConnectApi.php +++ b/src/Api/ConnectApi.php @@ -475,92 +475,6 @@ public function createConfigurationWithHttpInfo($account_id, $connect_custom_con } } - /** - * Operation createConnectSecret - * - * Generates a new connect HMAC Secret. - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function createConnectSecret($account_id) - { - list($response) = $this->createConnectSecretWithHttpInfo($account_id); - return $response; - } - - /** - * Operation createConnectSecretWithHttpInfo - * - * Generates a new connect HMAC Secret. - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function createConnectSecretWithHttpInfo($account_id) - { - // verify the required parameter 'account_id' is set - if ($account_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $account_id when calling createConnectSecret'); - } - // parse inputs - $resourcePath = "/v2.1/accounts/{accountId}/connect/secret"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($account_id !== null) { - $resourcePath = str_replace( - "{" . "accountId" . "}", - $this->apiClient->getSerializer()->toPathValue($account_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'POST', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/accounts/{accountId}/connect/secret' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation deleteConfiguration * @@ -661,106 +575,6 @@ public function deleteConfigurationWithHttpInfo($account_id, $connect_id) } } - /** - * Operation deleteConnectSecret - * - * Delete the connect HMAC Secret for AccountID - * - * @param string $account_id The external account number (int) or account ID Guid. - * @param string $key_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function deleteConnectSecret($account_id, $key_id) - { - list($response) = $this->deleteConnectSecretWithHttpInfo($account_id, $key_id); - return $response; - } - - /** - * Operation deleteConnectSecretWithHttpInfo - * - * Delete the connect HMAC Secret for AccountID - * - * @param string $account_id The external account number (int) or account ID Guid. - * @param string $key_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function deleteConnectSecretWithHttpInfo($account_id, $key_id) - { - // verify the required parameter 'account_id' is set - if ($account_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $account_id when calling deleteConnectSecret'); - } - // verify the required parameter 'key_id' is set - if ($key_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $key_id when calling deleteConnectSecret'); - } - // parse inputs - $resourcePath = "/v2.1/accounts/{accountId}/connect/secret/{keyId}/delete"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($account_id !== null) { - $resourcePath = str_replace( - "{" . "accountId" . "}", - $this->apiClient->getSerializer()->toPathValue($account_id), - $resourcePath - ); - } - // path params - if ($key_id !== null) { - $resourcePath = str_replace( - "{" . "keyId" . "}", - $this->apiClient->getSerializer()->toPathValue($key_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'DELETE', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/accounts/{accountId}/connect/secret/{keyId}/delete' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation deleteEventFailureLog * @@ -1144,92 +958,6 @@ public function deleteMobileNotifiersWithHttpInfo($account_id, $mobile_notifier_ } } - /** - * Operation generateConnectSecret - * - * Generates a new connect HMAC Secret. - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function generateConnectSecret($account_id) - { - list($response) = $this->generateConnectSecretWithHttpInfo($account_id); - return $response; - } - - /** - * Operation generateConnectSecretWithHttpInfo - * - * Generates a new connect HMAC Secret. - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function generateConnectSecretWithHttpInfo($account_id) - { - // verify the required parameter 'account_id' is set - if ($account_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $account_id when calling generateConnectSecret'); - } - // parse inputs - $resourcePath = "/v2.1/accounts/{accountId}/connect/secret"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($account_id !== null) { - $resourcePath = str_replace( - "{" . "accountId" . "}", - $this->apiClient->getSerializer()->toPathValue($account_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/accounts/{accountId}/connect/secret' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation getConfiguration * @@ -1334,92 +1062,6 @@ public function getConfigurationWithHttpInfo($account_id, $connect_id) } } - /** - * Operation getConnectSecrets - * - * Get the connect HMAC Secrets for AccountID - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function getConnectSecrets($account_id) - { - list($response) = $this->getConnectSecretsWithHttpInfo($account_id); - return $response; - } - - /** - * Operation getConnectSecretsWithHttpInfo - * - * Get the connect HMAC Secrets for AccountID - * - * @param string $account_id The external account number (int) or account ID Guid. - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function getConnectSecretsWithHttpInfo($account_id) - { - // verify the required parameter 'account_id' is set - if ($account_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $account_id when calling getConnectSecrets'); - } - // parse inputs - $resourcePath = "/v2.1/accounts/{accountId}/connect/secrets"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($account_id !== null) { - $resourcePath = str_replace( - "{" . "accountId" . "}", - $this->apiClient->getSerializer()->toPathValue($account_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/accounts/{accountId}/connect/secrets' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation getEventLog * diff --git a/src/Api/OrganizationsApi.php b/src/Api/OrganizationsApi.php index 0f114169..9ebda46e 100644 --- a/src/Api/OrganizationsApi.php +++ b/src/Api/OrganizationsApi.php @@ -191,106 +191,6 @@ public function deleteReportWithHttpInfo($organization_id, $report_correlation_i } } - /** - * Operation getAccountSettingsExport - * - * Retrieves an account settings comparison. - * - * @param string $organization_id - * @param string $result_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function getAccountSettingsExport($organization_id, $result_id) - { - list($response) = $this->getAccountSettingsExportWithHttpInfo($organization_id, $result_id); - return $response; - } - - /** - * Operation getAccountSettingsExportWithHttpInfo - * - * Retrieves an account settings comparison. - * - * @param string $organization_id - * @param string $result_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function getAccountSettingsExportWithHttpInfo($organization_id, $result_id) - { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling getAccountSettingsExport'); - } - // verify the required parameter 'result_id' is set - if ($result_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $result_id when calling getAccountSettingsExport'); - } - // parse inputs - $resourcePath = "/v2.1/organization_exports/{organizationId}/account_settings/{resultId}"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); - } - // path params - if ($result_id !== null) { - $resourcePath = str_replace( - "{" . "resultId" . "}", - $this->apiClient->getSerializer()->toPathValue($result_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/organization_exports/{organizationId}/account_settings/{resultId}' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } - /** * Operation getReport * @@ -390,104 +290,4 @@ public function getReportWithHttpInfo($organization_id, $report_correlation_id) throw $e; } } - - /** - * Operation getUserListExport - * - * Retrieves UserList Export Results data. - * - * @param string $organization_id - * @param string $result_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return void - */ - public function getUserListExport($organization_id, $result_id) - { - list($response) = $this->getUserListExportWithHttpInfo($organization_id, $result_id); - return $response; - } - - /** - * Operation getUserListExportWithHttpInfo - * - * Retrieves UserList Export Results data. - * - * @param string $organization_id - * @param string $result_id - * @throws \DocuSign\eSign\Client\ApiException on non-2xx response - * @return array of null, HTTP status code, HTTP response headers (array of strings) - */ - public function getUserListExportWithHttpInfo($organization_id, $result_id) - { - // verify the required parameter 'organization_id' is set - if ($organization_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $organization_id when calling getUserListExport'); - } - // verify the required parameter 'result_id' is set - if ($result_id === null) { - throw new \InvalidArgumentException('Missing the required parameter $result_id when calling getUserListExport'); - } - // parse inputs - $resourcePath = "/v2.1/organization_exports/{organizationId}/user_list/{resultId}"; - $httpBody = ''; - $queryParams = []; - $headerParams = []; - $formParams = []; - $_header_accept = $this->apiClient->selectHeaderAccept(['application/json']); - if (!is_null($_header_accept)) { - $headerParams['Accept'] = $_header_accept; - } - $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType([]); - - - // path params - if ($organization_id !== null) { - $resourcePath = str_replace( - "{" . "organizationId" . "}", - $this->apiClient->getSerializer()->toPathValue($organization_id), - $resourcePath - ); - } - // path params - if ($result_id !== null) { - $resourcePath = str_replace( - "{" . "resultId" . "}", - $this->apiClient->getSerializer()->toPathValue($result_id), - $resourcePath - ); - } - // default format to json - $resourcePath = str_replace("{format}", "json", $resourcePath); - - - // for model (json/xml) - if (isset($_tempBody)) { - $httpBody = $_tempBody; // $_tempBody is the method argument, if present - } elseif (count($formParams) > 0) { - $httpBody = $formParams; // for HTTP post (form) - } - // make the API Call - try { - list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( - $resourcePath, - 'GET', - $queryParams, - $httpBody, - $headerParams, - null, - '/v2.1/organization_exports/{organizationId}/user_list/{resultId}' - ); - - return [null, $statusCode, $httpHeader]; - } catch (ApiException $e) { - switch ($e->getCode()) { - case 400: - $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\DocuSign\eSign\Model\ErrorDetails', $e->getResponseHeaders()); - $e->setResponseObject($data); - break; - } - - throw $e; - } - } } diff --git a/src/Client/ApiClient.php b/src/Client/ApiClient.php index cf59d837..3e89dcf2 100644 --- a/src/Client/ApiClient.php +++ b/src/Client/ApiClient.php @@ -20,13 +20,21 @@ * Generated by: https://github.com/swagger-api/swagger-codegen.git */ +/** + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen + * Do not edit the class manually. + */ + namespace DocuSign\eSign\Client; use DocuSign\eSign\Client\Auth\OAuth; -use DocuSign\eSign\Configuration; -use DocuSign\eSign\ObjectSerializer; +use \DocuSign\eSign\Configuration; +use \DocuSign\eSign\ObjectSerializer; +use SebastianBergmann\RecursionContext\InvalidArgumentException; use Firebase\JWT\JWT; + /** * ApiClient Class Doc Comment * @@ -370,7 +378,7 @@ public function selectHeaderContentType($content_type) * * @param string $raw_headers A string of raw HTTP response headers * - * @return string[] Array of HTTP response headers + * @return string[] Array of HTTP response heaers */ protected function httpParseHeaders($raw_headers) { @@ -441,29 +449,26 @@ public function getAuthorizationURI($client_id, $scopes, $redirect_uri, $respons } /** - * @param string $grant_type Should be either "authorization_code" or "refresh_token". + * GenerateAccessToken will exchange the authorization code for an access token and refresh tokens. + * * @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key) * @param string $client_secret The secret key you generated when you set up the integration in DocuSign Admin console. - * @param string $code Depending on the grant_type this should be either the authorization code or the refresh token. + * @param string $code The authorization code * * @return array * @throws ApiException - * @throws \InvalidArgumentException + * @throws InvalidArgumentException */ - private function accessToken($grant_type, $client_id = null, $client_secret = null, $code = null) + public function generateAccessToken($client_id = null, $client_secret = null, $code = null) { - $caller = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS,2)[1]['function']; - if ($grant_type !== "authorization_code" && $grant_type !== "refresh_token") { - throw new \InvalidArgumentException('Grant type should be either "authorization_code" or "refresh_token"'); - } if (!$client_id) { - throw new \InvalidArgumentException("Missing the required parameter $client_id when calling {$caller}"); + throw new \InvalidArgumentException('Missing the required parameter $client_id when calling generateAccessToken'); } if (!$client_secret || !$code) { - throw new \InvalidArgumentException("Missing the required parameter $client_secret when calling {$caller}"); + throw new \InvalidArgumentException('Missing the required parameter $client_secret when calling generateAccessToken'); } if (!$code) { - throw new \InvalidArgumentException("Missing the required parameter $code when calling {$caller}"); + throw new \InvalidArgumentException('Missing the required parameter $code when calling generateAccessToken'); } $resourcePath = "/oauth/token"; @@ -474,53 +479,15 @@ private function accessToken($grant_type, $client_id = null, $client_secret = nu "Content-Type" => "application/x-www-form-urlencoded", ]; $postData = [ - "grant_type" => $grant_type + "grant_type" => "authorization_code", + "code" => $code ]; - - if ($grant_type === 'authorization_code') { - $postData['code'] = $code; - } elseif ($grant_type === 'refresh_token') { - $postData['refresh_token'] = $code; - } - list($response, $statusCode, $httpHeader) = $this->callApi($resourcePath, self::$POST, $queryParams, $postData, $headers, null, null, true); if(isset($response->access_token)) $this->config->addDefaultHeader("Authorization", "{$response->token_type} {$response->access_token}"); return [$this->getSerializer()->deserialize($response, '\DocuSign\eSign\Client\Auth\OAuthToken', $httpHeader), $statusCode, $httpHeader]; } - /** - * generateAccessToken will exchange the authorization code for an access token and a refresh token. - * - * @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key) - * @param string $client_secret The secret key you generated when you set up the integration in DocuSign Admin console. - * @param string $authorization_code The authorization code. - * - * @return array - * @throws ApiException - * @throws \InvalidArgumentException - */ - public function generateAccessToken($client_id = null, $client_secret = null, $authorization_code = null) - { - return $this->accessToken("authorization_code", $client_id, $client_secret, $authorization_code); - } - - /** - * refreshAccessToken will exchange the refresh token for a new access token and a new refresh token. - * - * @param string $client_id DocuSign OAuth Client Id(AKA Integrator Key) - * @param string $client_secret The secret key you generated when you set up the integration in DocuSign Admin console. - * @param string $refresh_token The refresh token. - * - * @return array - * @throws ApiException - * @throws \InvalidArgumentException - */ - public function refreshAccessToken($client_id = null, $client_secret = null, $refresh_token = null) - { - return $this->accessToken("refresh_token", $client_id, $client_secret, $refresh_token); - } - /** * Request JWT User Token * @@ -531,7 +498,7 @@ public function refreshAccessToken($client_id = null, $client_secret = null, $re * @param int $expires_in Number of minutes token will be valid * @return array * @throws ApiException - * @throws \InvalidArgumentException + * @throws InvalidArgumentException */ public function requestJWTUserToken($client_id, $user_id, $rsa_private_key, $scopes = null, $expires_in = 60) { diff --git a/src/Configuration.php b/src/Configuration.php index b9c264ed..fe43d02c 100644 --- a/src/Configuration.php +++ b/src/Configuration.php @@ -109,7 +109,7 @@ class Configuration * * @var string */ - protected $userAgent = "Swagger-Codegen/5.1.0-rc/php"; + protected $userAgent = "Swagger-Codegen/5.1.0/php"; /** * Debug switch (default set to false) @@ -695,7 +695,7 @@ public static function toDebugReport() $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . phpversion() . PHP_EOL; $report .= ' OpenAPI Spec Version: v2.1' . PHP_EOL; - $report .= ' SDK Package Version: 5.1.0-rc' . PHP_EOL; + $report .= ' SDK Package Version: 5.1.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report;