Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 14 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,29 @@ https://github.com/SignRequest/signrequest-php-example

## Requirements

PHP 5.5 and later
PHP 7.1 and later

## Installation & Usage
### Composer

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"
}
}
```
Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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",
Expand All @@ -34,4 +34,4 @@
"autoload-dev": {
"psr-4": { "SignRequest\\" : "test/" }
}
}
}
4 changes: 2 additions & 2 deletions src/Api/ApiTokensApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
12 changes: 6 additions & 6 deletions src/Api/DocumentAttachmentsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
22 changes: 11 additions & 11 deletions src/Api/DocumentsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
10 changes: 5 additions & 5 deletions src/Api/DocumentsSearchApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
14 changes: 7 additions & 7 deletions src/Api/EventsApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
10 changes: 5 additions & 5 deletions src/Api/SignrequestQuickCreateApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -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}" : ''),
Expand Down
Loading