Skip to content

Commit

Permalink
Version 4.6.0-rc release (#117)
Browse files Browse the repository at this point in the history
* Version 4.6.0-rc-v2-20.3.00 release

* Reverted not required changes?

* Reverted not required changes in travis?

* Corrected changelog?

Co-authored-by: DevCenter-DocuSign <[email protected]>
Co-authored-by: Dhaval Brahmbhatt <[email protected]>
  • Loading branch information
3 people authored Sep 18, 2020
1 parent b4dd4ba commit fc281b6
Show file tree
Hide file tree
Showing 6 changed files with 223 additions and 12 deletions.
5 changes: 1 addition & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ language: php
dist: trusty
sudo: false
php:
- 5.4
- 5.5
- 5.6
- 7.0
before_install: "travis_wait 30 composer install --ignore-platform-reqs"
before_install: "composer install --ignore-platform-reqs"
script: "cd test && phpunit UnitTests.php && phpunit OAuthTests.php"
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@ 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.

## [4.6.0-rc] - eSignature API v2-20.3.00 - 2020-09-16
### Changed

* Added support for version v2-20.3.00 of the DocuSign eSignature API.
* Updated the SDK release version.

### Fixed

* Fixed APIException Serialization issue
* [#83](https://github.com/docusign/docusign-php-client/issues/83) - DCM-3466
* [#103](https://github.com/docusign/docusign-php-client/issues/103) - DCM-4286

## [4.5.0] - eSignature API v2-20.2.02 - 2020-08-25
### Changed

Expand Down
111 changes: 111 additions & 0 deletions src/Api/EnvelopesApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -4958,6 +4958,117 @@ public function deleteEmailSettingsWithHttpInfo($account_id, $envelope_id)
}
}

/**
* Operation deleteEnvelopeCorrectView
*
* Revokes the correction view URL to the Envelope UI
*
* @param string $account_id The external account number (int) or account ID Guid.
* @param string $envelope_id The envelopeId Guid of the envelope being accessed.
* @param \DocuSign\eSign\Model\CorrectViewRequest $correct_view_request (optional)
* @throws \DocuSign\eSign\Client\ApiException on non-2xx response
* @return void
*/
public function deleteEnvelopeCorrectView($account_id, $envelope_id, $correct_view_request = null)
{
list($response) = $this->deleteEnvelopeCorrectViewWithHttpInfo($account_id, $envelope_id, $correct_view_request);
return $response;
}

/**
* Operation deleteEnvelopeCorrectViewWithHttpInfo
*
* Revokes the correction view URL to the Envelope UI
*
* @param string $account_id The external account number (int) or account ID Guid.
* @param string $envelope_id The envelopeId Guid of the envelope being accessed.
* @param \DocuSign\eSign\Model\CorrectViewRequest $correct_view_request (optional)
* @throws \DocuSign\eSign\Client\ApiException on non-2xx response
* @return array of null, HTTP status code, HTTP response headers (array of strings)
*/
public function deleteEnvelopeCorrectViewWithHttpInfo($account_id, $envelope_id, $correct_view_request = null)
{
// verify the required parameter 'account_id' is set
if ($account_id === null) {
throw new \InvalidArgumentException('Missing the required parameter $account_id when calling deleteEnvelopeCorrectView');
}
// verify the required parameter 'envelope_id' is set
if ($envelope_id === null) {
throw new \InvalidArgumentException('Missing the required parameter $envelope_id when calling deleteEnvelopeCorrectView');
}
// parse inputs
$resourcePath = "/v2/accounts/{accountId}/envelopes/{envelopeId}/views/correct";
$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 ($envelope_id !== null) {
$resourcePath = str_replace(
"{" . "envelopeId" . "}",
$this->apiClient->getSerializer()->toPathValue($envelope_id),
$resourcePath
);
}
// default format to json
$resourcePath = str_replace("{format}", "json", $resourcePath);

// body params
$_tempBody = null;
if (isset($correct_view_request)) {
$_tempBody = $correct_view_request;
}

// 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)
}
// this endpoint requires OAuth (access token)
if (strlen($this->apiClient->getConfig()->getAccessToken()) !== 0) {
$headerParams['Authorization'] = 'Bearer ' . $this->apiClient->getConfig()->getAccessToken();
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath,
'DELETE',
$queryParams,
$httpBody,
$headerParams,
null,
'/v2/accounts/{accountId}/envelopes/{envelopeId}/views/correct'
);

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 deleteLock
*
Expand Down
7 changes: 4 additions & 3 deletions src/Client/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,15 +320,16 @@ public function callApi($resourcePath, $method, $queryParams, $postData, $header
}
} else {
$data = json_decode($http_body);
$serializedData = $data;
if (json_last_error() > 0) { // if response is a string
$data = $http_body;
}
if(is_object($data)){
$data = serialize($data);
if(is_object($serializedData)){
$serializedData = serialize($serializedData);
}

throw new ApiException(
"Error while requesting server, received a non successful HTTP code [".$response_info['http_code']."] with response Body: $data",
"Error while requesting server, received a non successful HTTP code [".$response_info['http_code']."] with response Body: $serializedData",
$response_info['http_code'],
$http_header,
$data
Expand Down
40 changes: 35 additions & 5 deletions src/Model/CorrectViewRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ class CorrectViewRequest implements ModelInterface, ArrayAccess
*/
protected static $swaggerTypes = [
'return_url' => 'string',
'suppress_navigation' => 'string'
'suppress_navigation' => 'string',
'view_url' => 'string'
];

/**
Expand All @@ -68,7 +69,8 @@ class CorrectViewRequest implements ModelInterface, ArrayAccess
*/
protected static $swaggerFormats = [
'return_url' => null,
'suppress_navigation' => null
'suppress_navigation' => null,
'view_url' => null
];

/**
Expand Down Expand Up @@ -99,7 +101,8 @@ public static function swaggerFormats()
*/
protected static $attributeMap = [
'return_url' => 'returnUrl',
'suppress_navigation' => 'suppressNavigation'
'suppress_navigation' => 'suppressNavigation',
'view_url' => 'viewUrl'
];

/**
Expand All @@ -109,7 +112,8 @@ public static function swaggerFormats()
*/
protected static $setters = [
'return_url' => 'setReturnUrl',
'suppress_navigation' => 'setSuppressNavigation'
'suppress_navigation' => 'setSuppressNavigation',
'view_url' => 'setViewUrl'
];

/**
Expand All @@ -119,7 +123,8 @@ public static function swaggerFormats()
*/
protected static $getters = [
'return_url' => 'getReturnUrl',
'suppress_navigation' => 'getSuppressNavigation'
'suppress_navigation' => 'getSuppressNavigation',
'view_url' => 'getViewUrl'
];

/**
Expand Down Expand Up @@ -184,6 +189,7 @@ public function __construct(array $data = null)
{
$this->container['return_url'] = isset($data['return_url']) ? $data['return_url'] : null;
$this->container['suppress_navigation'] = isset($data['suppress_navigation']) ? $data['suppress_navigation'] : null;
$this->container['view_url'] = isset($data['view_url']) ? $data['view_url'] : null;
}

/**
Expand Down Expand Up @@ -257,6 +263,30 @@ public function setSuppressNavigation($suppress_navigation)

return $this;
}

/**
* Gets view_url
*
* @return string
*/
public function getViewUrl()
{
return $this->container['view_url'];
}

/**
* Sets view_url
*
* @param string $view_url
*
* @return $this
*/
public function setViewUrl($view_url)
{
$this->container['view_url'] = $view_url;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
60 changes: 60 additions & 0 deletions src/Model/UserAccountManagementGranularInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ class UserAccountManagementGranularInformation implements ModelInterface, ArrayA
'can_manage_account_settings_metadata' => '\DocuSign\eSign\Model\SettingsMetadata',
'can_manage_admins' => 'string',
'can_manage_admins_metadata' => '\DocuSign\eSign\Model\SettingsMetadata',
'can_manage_envelope_transfer' => 'string',
'can_manage_envelope_transfer_metadata' => '\DocuSign\eSign\Model\SettingsMetadata',
'can_manage_groups' => 'string',
'can_manage_groups_metadata' => '\DocuSign\eSign\Model\SettingsMetadata',
'can_manage_reporting' => 'string',
Expand All @@ -89,6 +91,8 @@ class UserAccountManagementGranularInformation implements ModelInterface, ArrayA
'can_manage_account_settings_metadata' => null,
'can_manage_admins' => null,
'can_manage_admins_metadata' => null,
'can_manage_envelope_transfer' => null,
'can_manage_envelope_transfer_metadata' => null,
'can_manage_groups' => null,
'can_manage_groups_metadata' => null,
'can_manage_reporting' => null,
Expand Down Expand Up @@ -136,6 +140,8 @@ public static function swaggerFormats()
'can_manage_account_settings_metadata' => 'canManageAccountSettingsMetadata',
'can_manage_admins' => 'canManageAdmins',
'can_manage_admins_metadata' => 'canManageAdminsMetadata',
'can_manage_envelope_transfer' => 'canManageEnvelopeTransfer',
'can_manage_envelope_transfer_metadata' => 'canManageEnvelopeTransferMetadata',
'can_manage_groups' => 'canManageGroups',
'can_manage_groups_metadata' => 'canManageGroupsMetadata',
'can_manage_reporting' => 'canManageReporting',
Expand All @@ -162,6 +168,8 @@ public static function swaggerFormats()
'can_manage_account_settings_metadata' => 'setCanManageAccountSettingsMetadata',
'can_manage_admins' => 'setCanManageAdmins',
'can_manage_admins_metadata' => 'setCanManageAdminsMetadata',
'can_manage_envelope_transfer' => 'setCanManageEnvelopeTransfer',
'can_manage_envelope_transfer_metadata' => 'setCanManageEnvelopeTransferMetadata',
'can_manage_groups' => 'setCanManageGroups',
'can_manage_groups_metadata' => 'setCanManageGroupsMetadata',
'can_manage_reporting' => 'setCanManageReporting',
Expand All @@ -188,6 +196,8 @@ public static function swaggerFormats()
'can_manage_account_settings_metadata' => 'getCanManageAccountSettingsMetadata',
'can_manage_admins' => 'getCanManageAdmins',
'can_manage_admins_metadata' => 'getCanManageAdminsMetadata',
'can_manage_envelope_transfer' => 'getCanManageEnvelopeTransfer',
'can_manage_envelope_transfer_metadata' => 'getCanManageEnvelopeTransferMetadata',
'can_manage_groups' => 'getCanManageGroups',
'can_manage_groups_metadata' => 'getCanManageGroupsMetadata',
'can_manage_reporting' => 'getCanManageReporting',
Expand Down Expand Up @@ -268,6 +278,8 @@ public function __construct(array $data = null)
$this->container['can_manage_account_settings_metadata'] = isset($data['can_manage_account_settings_metadata']) ? $data['can_manage_account_settings_metadata'] : null;
$this->container['can_manage_admins'] = isset($data['can_manage_admins']) ? $data['can_manage_admins'] : null;
$this->container['can_manage_admins_metadata'] = isset($data['can_manage_admins_metadata']) ? $data['can_manage_admins_metadata'] : null;
$this->container['can_manage_envelope_transfer'] = isset($data['can_manage_envelope_transfer']) ? $data['can_manage_envelope_transfer'] : null;
$this->container['can_manage_envelope_transfer_metadata'] = isset($data['can_manage_envelope_transfer_metadata']) ? $data['can_manage_envelope_transfer_metadata'] : null;
$this->container['can_manage_groups'] = isset($data['can_manage_groups']) ? $data['can_manage_groups'] : null;
$this->container['can_manage_groups_metadata'] = isset($data['can_manage_groups_metadata']) ? $data['can_manage_groups_metadata'] : null;
$this->container['can_manage_reporting'] = isset($data['can_manage_reporting']) ? $data['can_manage_reporting'] : null;
Expand Down Expand Up @@ -450,6 +462,54 @@ public function setCanManageAdminsMetadata($can_manage_admins_metadata)
return $this;
}

/**
* Gets can_manage_envelope_transfer
*
* @return string
*/
public function getCanManageEnvelopeTransfer()
{
return $this->container['can_manage_envelope_transfer'];
}

/**
* Sets can_manage_envelope_transfer
*
* @param string $can_manage_envelope_transfer
*
* @return $this
*/
public function setCanManageEnvelopeTransfer($can_manage_envelope_transfer)
{
$this->container['can_manage_envelope_transfer'] = $can_manage_envelope_transfer;

return $this;
}

/**
* Gets can_manage_envelope_transfer_metadata
*
* @return \DocuSign\eSign\Model\SettingsMetadata
*/
public function getCanManageEnvelopeTransferMetadata()
{
return $this->container['can_manage_envelope_transfer_metadata'];
}

/**
* Sets can_manage_envelope_transfer_metadata
*
* @param \DocuSign\eSign\Model\SettingsMetadata $can_manage_envelope_transfer_metadata can_manage_envelope_transfer_metadata
*
* @return $this
*/
public function setCanManageEnvelopeTransferMetadata($can_manage_envelope_transfer_metadata)
{
$this->container['can_manage_envelope_transfer_metadata'] = $can_manage_envelope_transfer_metadata;

return $this;
}

/**
* Gets can_manage_groups
*
Expand Down

0 comments on commit fc281b6

Please sign in to comment.