diff --git a/README.md b/README.md index daa9786..aa14ea1 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ https://github.com/SignRequest/signrequest-php-example ## Requirements -PHP 5.5 and later +PHP 7.1 and later ## Installation & Usage ### Composer @@ -18,9 +18,21 @@ PHP 5.5 and later To install the bindings via [Composer](http://getcomposer.org/), add the following to `composer.json`: ``` +{ + "repositories": { + "liquidline/signrequest-php-client": { + "type": "vcs", + "url": "https://github.com/liquidline/signrequest-php-client.git" + }, + } +} +``` + + +``` { "require": { - "signrequest/signrequest-client": "1.3.0" + "signrequest/signrequest-client": "1.4.2" } } ``` diff --git a/composer.json b/composer.json index 1c81981..ff60d3c 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { - "name": "signrequest/signrequest-client", - "version": "1.3.0", + "name": "liquidline/signrequest-php-client", + "version": "1.4.2", "description": "Official PHP client for SignRequest.com (https://signrequest.com)", "keywords": [ "signrequest", @@ -17,11 +17,11 @@ } ], "require": { - "php": ">=5.5", + "php": ">=7.1", "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "guzzlehttp/guzzle": "^6.2" + "guzzlehttp/guzzle": "^6.2|^7.0.1" }, "require-dev": { "phpunit/phpunit": "^4.8", @@ -34,4 +34,4 @@ "autoload-dev": { "psr-4": { "SignRequest\\" : "test/" } } -} \ No newline at end of file +} diff --git a/src/Api/ApiTokensApi.php b/src/Api/ApiTokensApi.php index 58725d9..beafa67 100644 --- a/src/Api/ApiTokensApi.php +++ b/src/Api/ApiTokensApi.php @@ -328,7 +328,7 @@ protected function apiTokensListRequest($page = null, $limit = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -349,7 +349,7 @@ protected function apiTokensListRequest($page = null, $limit = null) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/DocumentAttachmentsApi.php b/src/Api/DocumentAttachmentsApi.php index 9fc9882..efa0ef2 100644 --- a/src/Api/DocumentAttachmentsApi.php +++ b/src/Api/DocumentAttachmentsApi.php @@ -324,7 +324,7 @@ protected function documentAttachmentsCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -345,7 +345,7 @@ protected function documentAttachmentsCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -624,7 +624,7 @@ protected function documentAttachmentsListRequest($document__uuid = null, $docum } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -645,7 +645,7 @@ protected function documentAttachmentsListRequest($document__uuid = null, $docum $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -898,7 +898,7 @@ protected function documentAttachmentsReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -919,7 +919,7 @@ protected function documentAttachmentsReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/DocumentsApi.php b/src/Api/DocumentsApi.php index 180804f..cf7ef64 100644 --- a/src/Api/DocumentsApi.php +++ b/src/Api/DocumentsApi.php @@ -68,9 +68,9 @@ class DocumentsApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -324,7 +324,7 @@ protected function documentsCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -345,7 +345,7 @@ protected function documentsCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -561,7 +561,7 @@ protected function documentsDeleteRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -582,7 +582,7 @@ protected function documentsDeleteRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -915,7 +915,7 @@ protected function documentsListRequest($external_id = null, $signrequest__who = } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -936,7 +936,7 @@ protected function documentsListRequest($external_id = null, $signrequest__who = $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1189,7 +1189,7 @@ protected function documentsReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1210,7 +1210,7 @@ protected function documentsReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/DocumentsSearchApi.php b/src/Api/DocumentsSearchApi.php index 811237e..673d3dd 100644 --- a/src/Api/DocumentsSearchApi.php +++ b/src/Api/DocumentsSearchApi.php @@ -68,9 +68,9 @@ class DocumentsSearchApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -409,7 +409,7 @@ protected function documentsSearchListRequest($page = null, $limit = null, $q = } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -430,7 +430,7 @@ protected function documentsSearchListRequest($page = null, $limit = null, $q = $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/EventsApi.php b/src/Api/EventsApi.php index a59ff7f..24853e9 100644 --- a/src/Api/EventsApi.php +++ b/src/Api/EventsApi.php @@ -68,9 +68,9 @@ class EventsApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -445,7 +445,7 @@ protected function eventsListRequest($document__uuid = null, $document__external } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -466,7 +466,7 @@ protected function eventsListRequest($document__uuid = null, $document__external $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -719,7 +719,7 @@ protected function eventsReadRequest($id) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -740,7 +740,7 @@ protected function eventsReadRequest($id) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/SignrequestQuickCreateApi.php b/src/Api/SignrequestQuickCreateApi.php index 56304a4..17fb790 100644 --- a/src/Api/SignrequestQuickCreateApi.php +++ b/src/Api/SignrequestQuickCreateApi.php @@ -68,9 +68,9 @@ class SignrequestQuickCreateApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -324,7 +324,7 @@ protected function signrequestQuickCreateCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -345,7 +345,7 @@ protected function signrequestQuickCreateCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/SignrequestsApi.php b/src/Api/SignrequestsApi.php index 294735d..00b115b 100644 --- a/src/Api/SignrequestsApi.php +++ b/src/Api/SignrequestsApi.php @@ -68,9 +68,9 @@ class SignrequestsApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -329,7 +329,7 @@ protected function signrequestsCancelSignrequestRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -350,7 +350,7 @@ protected function signrequestsCancelSignrequestRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -598,7 +598,7 @@ protected function signrequestsCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -619,7 +619,7 @@ protected function signrequestsCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -889,7 +889,7 @@ protected function signrequestsListRequest($who = null, $from_email = null, $pag } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -910,7 +910,7 @@ protected function signrequestsListRequest($who = null, $from_email = null, $pag $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1163,7 +1163,7 @@ protected function signrequestsReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1184,7 +1184,7 @@ protected function signrequestsReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1437,7 +1437,7 @@ protected function signrequestsResendSignrequestEmailRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1458,7 +1458,7 @@ protected function signrequestsResendSignrequestEmailRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/TeamMembersApi.php b/src/Api/TeamMembersApi.php index 3eda6ab..adb5b6a 100644 --- a/src/Api/TeamMembersApi.php +++ b/src/Api/TeamMembersApi.php @@ -68,9 +68,9 @@ class TeamMembersApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -382,7 +382,7 @@ protected function teamMembersListRequest($is_active = null, $is_owner = null, $ } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -403,7 +403,7 @@ protected function teamMembersListRequest($is_active = null, $is_owner = null, $ $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -656,7 +656,7 @@ protected function teamMembersReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -677,7 +677,7 @@ protected function teamMembersReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/TeamsApi.php b/src/Api/TeamsApi.php index 0b2268a..9989734 100644 --- a/src/Api/TeamsApi.php +++ b/src/Api/TeamsApi.php @@ -68,9 +68,9 @@ class TeamsApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -324,7 +324,7 @@ protected function teamsCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -345,7 +345,7 @@ protected function teamsCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -561,7 +561,7 @@ protected function teamsDeleteRequest($subdomain) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -582,7 +582,7 @@ protected function teamsDeleteRequest($subdomain) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -849,7 +849,7 @@ protected function teamsInviteMemberRequest($subdomain, $data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -870,7 +870,7 @@ protected function teamsInviteMemberRequest($subdomain, $data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1122,7 +1122,7 @@ protected function teamsListRequest($page = null, $limit = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1143,7 +1143,7 @@ protected function teamsListRequest($page = null, $limit = null) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1410,7 +1410,7 @@ protected function teamsPartialUpdateRequest($subdomain, $data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1431,7 +1431,7 @@ protected function teamsPartialUpdateRequest($subdomain, $data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'PATCH', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1684,7 +1684,7 @@ protected function teamsReadRequest($subdomain) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1705,7 +1705,7 @@ protected function teamsReadRequest($subdomain) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/TemplatesApi.php b/src/Api/TemplatesApi.php index 9a74ffc..951e966 100644 --- a/src/Api/TemplatesApi.php +++ b/src/Api/TemplatesApi.php @@ -68,9 +68,9 @@ class TemplatesApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -328,7 +328,7 @@ protected function templatesListRequest($page = null, $limit = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -349,7 +349,7 @@ protected function templatesListRequest($page = null, $limit = null) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -602,7 +602,7 @@ protected function templatesReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -623,7 +623,7 @@ protected function templatesReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Api/WebhooksApi.php b/src/Api/WebhooksApi.php index 7066c80..2cc8f12 100644 --- a/src/Api/WebhooksApi.php +++ b/src/Api/WebhooksApi.php @@ -68,9 +68,9 @@ class WebhooksApi * @param HeaderSelector $selector */ public function __construct( - ClientInterface $client = null, - Configuration $config = null, - HeaderSelector $selector = null + ?ClientInterface $client = null, + ?Configuration $config = null, + ?HeaderSelector $selector = null ) { $this->client = $client ?: new Client(); $this->config = $config ?: new Configuration(); @@ -324,7 +324,7 @@ protected function webhooksCreateRequest($data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -345,7 +345,7 @@ protected function webhooksCreateRequest($data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'POST', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -561,7 +561,7 @@ protected function webhooksDeleteRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -582,7 +582,7 @@ protected function webhooksDeleteRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'DELETE', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -834,7 +834,7 @@ protected function webhooksListRequest($page = null, $limit = null) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -855,7 +855,7 @@ protected function webhooksListRequest($page = null, $limit = null) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1122,7 +1122,7 @@ protected function webhooksPartialUpdateRequest($uuid, $data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1143,7 +1143,7 @@ protected function webhooksPartialUpdateRequest($uuid, $data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'PATCH', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1396,7 +1396,7 @@ protected function webhooksReadRequest($uuid) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1417,7 +1417,7 @@ protected function webhooksReadRequest($uuid) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'GET', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), @@ -1684,7 +1684,7 @@ protected function webhooksUpdateRequest($uuid, $data) } else { // for HTTP post (form) - $httpBody = \GuzzleHttp\Psr7\build_query($formParams); + $httpBody = \GuzzleHttp\Psr7\Query::build($formParams); } } @@ -1705,7 +1705,7 @@ protected function webhooksUpdateRequest($uuid, $data) $headers ); - $query = \GuzzleHttp\Psr7\build_query($queryParams); + $query = \GuzzleHttp\Psr7\Query::build($queryParams); return new Request( 'PUT', $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''), diff --git a/src/Model/Document.php b/src/Model/Document.php index 49b7e34..b6e3042 100644 --- a/src/Model/Document.php +++ b/src/Model/Document.php @@ -353,7 +353,7 @@ public function getStatusAllowableValues() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['url'] = isset($data['url']) ? $data['url'] : null; $this->container['team'] = isset($data['team']) ? $data['team'] : null; diff --git a/src/Model/DocumentSigningLog.php b/src/Model/DocumentSigningLog.php index 728bdb1..bc6bb66 100644 --- a/src/Model/DocumentSigningLog.php +++ b/src/Model/DocumentSigningLog.php @@ -178,7 +178,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['pdf'] = isset($data['pdf']) ? $data['pdf'] : null; $this->container['security_hash'] = isset($data['security_hash']) ? $data['security_hash'] : null; diff --git a/src/Model/DocumentSignrequest.php b/src/Model/DocumentSignrequest.php index 54d0b0c..0f2b681 100644 --- a/src/Model/DocumentSignrequest.php +++ b/src/Model/DocumentSignrequest.php @@ -290,7 +290,7 @@ public function getWhoAllowableValues() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['from_email'] = isset($data['from_email']) ? $data['from_email'] : null; $this->container['from_email_name'] = isset($data['from_email_name']) ? $data['from_email_name'] : null; diff --git a/src/Model/DocumentTeam.php b/src/Model/DocumentTeam.php index 16c511e..2cdd6b1 100644 --- a/src/Model/DocumentTeam.php +++ b/src/Model/DocumentTeam.php @@ -183,7 +183,7 @@ public function getModelName() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['name'] = isset($data['name']) ? $data['name'] : null; $this->container['subdomain'] = isset($data['subdomain']) ? $data['subdomain'] : null; diff --git a/src/Model/Signer.php b/src/Model/Signer.php index 57bd1b9..388d524 100644 --- a/src/Model/Signer.php +++ b/src/Model/Signer.php @@ -391,7 +391,7 @@ public function getLanguageAllowableValues() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['email'] = isset($data['email']) ? $data['email'] : null; $this->container['display_name'] = isset($data['display_name']) ? $data['display_name'] : null; @@ -1181,7 +1181,8 @@ public function setForwardedReason($forwarded_reason) { if (!is_null($forwarded_reason) && (mb_strlen($forwarded_reason) < 1)) { - throw new \InvalidArgumentException('invalid length for $forwarded_reason when calling Signer., must be bigger than or equal to 1.'); + //throw new \InvalidArgumentException('invalid length for $forwarded_reason when calling Signer., must be bigger than or equal to 1.'); + $forwarded_reason = ' N/A'; } $this->container['forwarded_reason'] = $forwarded_reason; diff --git a/src/Model/SignerInputs.php b/src/Model/SignerInputs.php index 4d87a21..56d6a62 100644 --- a/src/Model/SignerInputs.php +++ b/src/Model/SignerInputs.php @@ -226,7 +226,7 @@ public function getTypeAllowableValues() * @param mixed[] $data Associated array of property values * initializing the model */ - public function __construct(array $data = null) + public function __construct(?array $data = null) { $this->container['type'] = isset($data['type']) ? $data['type'] : null; $this->container['page_index'] = isset($data['page_index']) ? $data['page_index'] : null;