Skip to content

Commit f816c76

Browse files
v5.7.1
v5.7.1
1 parent 929c429 commit f816c76

File tree

7 files changed

+579
-23
lines changed

7 files changed

+579
-23
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ or add the following to `composer.json`:
1919
```json
2020
{
2121
"require": {
22-
"pandadoc/php-client": "5.7.0"
22+
"pandadoc/php-client": "5.7.1"
2323
}
2424
}
2525
```

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "pandadoc/php-client",
3-
"version": "5.7.0",
3+
"version": "5.7.1",
44
"description": "The Official PandaDoc PHP client SDK",
55
"keywords": [
66
"openapi",

docs/Api/DocumentRecipientsApi.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Method | HTTP request | Description
1313
## `addDocumentRecipient()`
1414

1515
```php
16-
addDocumentRecipient($id, $documentRecipientCreateRequest)
16+
addDocumentRecipient($id, $documentRecipientCreateRequest): \PandaDoc\Client\Model\InlineResponse200
1717
```
1818

1919
Add Document Recipient
@@ -46,7 +46,8 @@ $id = BhVzRcxH9Z2LgfPPGXFUBa; // string | Document UUID
4646
$documentRecipientCreateRequest = new \PandaDoc\Client\Model\DocumentRecipientCreateRequest(); // \PandaDoc\Client\Model\DocumentRecipientCreateRequest
4747

4848
try {
49-
$apiInstance->addDocumentRecipient($id, $documentRecipientCreateRequest);
49+
$result = $apiInstance->addDocumentRecipient($id, $documentRecipientCreateRequest);
50+
print_r($result);
5051
} catch (Exception $e) {
5152
echo 'Exception when calling DocumentRecipientsApi->addDocumentRecipient: ', $e->getMessage(), PHP_EOL;
5253
}
@@ -61,7 +62,7 @@ Name | Type | Description | Notes
6162

6263
### Return type
6364

64-
void (empty response body)
65+
[**\PandaDoc\Client\Model\InlineResponse200**](../Model/InlineResponse200.md)
6566

6667
### Authorization
6768

@@ -210,7 +211,7 @@ void (empty response body)
210211
## `reassignDocumentRecipient()`
211212

212213
```php
213-
reassignDocumentRecipient($id, $recipientId, $documentRecipientCreateRequest)
214+
reassignDocumentRecipient($id, $recipientId, $documentRecipientCreateRequest): object
214215
```
215216

216217
Reassign Document Recipient
@@ -244,7 +245,8 @@ $recipientId = tf5dGS3Tmu3cj228ao6fnc; // string | Recipient UUID
244245
$documentRecipientCreateRequest = new \PandaDoc\Client\Model\DocumentRecipientCreateRequest(); // \PandaDoc\Client\Model\DocumentRecipientCreateRequest
245246

246247
try {
247-
$apiInstance->reassignDocumentRecipient($id, $recipientId, $documentRecipientCreateRequest);
248+
$result = $apiInstance->reassignDocumentRecipient($id, $recipientId, $documentRecipientCreateRequest);
249+
print_r($result);
248250
} catch (Exception $e) {
249251
echo 'Exception when calling DocumentRecipientsApi->reassignDocumentRecipient: ', $e->getMessage(), PHP_EOL;
250252
}
@@ -260,7 +262,7 @@ Name | Type | Description | Notes
260262

261263
### Return type
262264

263-
void (empty response body)
265+
**object**
264266

265267
### Authorization
266268

docs/Model/InlineResponse200.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# # InlineResponse200
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**actorId** | **string** | | [optional]
8+
9+
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

src/Api/DocumentRecipientsApi.php

Lines changed: 222 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,12 @@ public function getConfig()
123123
*
124124
* @throws \PandaDoc\Client\ApiException on non-2xx response
125125
* @throws \InvalidArgumentException
126-
* @return void
126+
* @return \PandaDoc\Client\Model\InlineResponse200|object|object|object|object|object
127127
*/
128128
public function addDocumentRecipient($id, $documentRecipientCreateRequest)
129129
{
130-
$this->addDocumentRecipientWithHttpInfo($id, $documentRecipientCreateRequest);
130+
list($response) = $this->addDocumentRecipientWithHttpInfo($id, $documentRecipientCreateRequest);
131+
return $response;
131132
}
132133

133134
/**
@@ -140,7 +141,7 @@ public function addDocumentRecipient($id, $documentRecipientCreateRequest)
140141
*
141142
* @throws \PandaDoc\Client\ApiException on non-2xx response
142143
* @throws \InvalidArgumentException
143-
* @return array of null, HTTP status code, HTTP response headers (array of strings)
144+
* @return array of \PandaDoc\Client\Model\InlineResponse200|object|object|object|object|object, HTTP status code, HTTP response headers (array of strings)
144145
*/
145146
public function addDocumentRecipientWithHttpInfo($id, $documentRecipientCreateRequest)
146147
{
@@ -181,10 +182,104 @@ public function addDocumentRecipientWithHttpInfo($id, $documentRecipientCreateRe
181182
);
182183
}
183184

184-
return [null, $statusCode, $response->getHeaders()];
185+
switch($statusCode) {
186+
case 200:
187+
if ('\PandaDoc\Client\Model\InlineResponse200' === '\SplFileObject') {
188+
$content = $response->getBody(); //stream goes to serializer
189+
} else {
190+
$content = (string) $response->getBody();
191+
}
192+
193+
return [
194+
ObjectSerializer::deserialize($content, '\PandaDoc\Client\Model\InlineResponse200', []),
195+
$response->getStatusCode(),
196+
$response->getHeaders()
197+
];
198+
case 400:
199+
if ('object' === '\SplFileObject') {
200+
$content = $response->getBody(); //stream goes to serializer
201+
} else {
202+
$content = (string) $response->getBody();
203+
}
204+
205+
return [
206+
ObjectSerializer::deserialize($content, 'object', []),
207+
$response->getStatusCode(),
208+
$response->getHeaders()
209+
];
210+
case 401:
211+
if ('object' === '\SplFileObject') {
212+
$content = $response->getBody(); //stream goes to serializer
213+
} else {
214+
$content = (string) $response->getBody();
215+
}
216+
217+
return [
218+
ObjectSerializer::deserialize($content, 'object', []),
219+
$response->getStatusCode(),
220+
$response->getHeaders()
221+
];
222+
case 403:
223+
if ('object' === '\SplFileObject') {
224+
$content = $response->getBody(); //stream goes to serializer
225+
} else {
226+
$content = (string) $response->getBody();
227+
}
228+
229+
return [
230+
ObjectSerializer::deserialize($content, 'object', []),
231+
$response->getStatusCode(),
232+
$response->getHeaders()
233+
];
234+
case 404:
235+
if ('object' === '\SplFileObject') {
236+
$content = $response->getBody(); //stream goes to serializer
237+
} else {
238+
$content = (string) $response->getBody();
239+
}
240+
241+
return [
242+
ObjectSerializer::deserialize($content, 'object', []),
243+
$response->getStatusCode(),
244+
$response->getHeaders()
245+
];
246+
case 429:
247+
if ('object' === '\SplFileObject') {
248+
$content = $response->getBody(); //stream goes to serializer
249+
} else {
250+
$content = (string) $response->getBody();
251+
}
252+
253+
return [
254+
ObjectSerializer::deserialize($content, 'object', []),
255+
$response->getStatusCode(),
256+
$response->getHeaders()
257+
];
258+
}
259+
260+
$returnType = '\PandaDoc\Client\Model\InlineResponse200';
261+
if ($returnType === '\SplFileObject') {
262+
$content = $response->getBody(); //stream goes to serializer
263+
} else {
264+
$content = (string) $response->getBody();
265+
}
266+
267+
return [
268+
ObjectSerializer::deserialize($content, $returnType, []),
269+
$response->getStatusCode(),
270+
$response->getHeaders()
271+
];
185272

186273
} catch (ApiException $e) {
187274
switch ($e->getCode()) {
275+
case 200:
276+
$data = ObjectSerializer::deserialize(
277+
$e->getResponseBody(),
278+
'\PandaDoc\Client\Model\InlineResponse200',
279+
$e->getResponseHeaders()
280+
);
281+
$e->setResponseObject($data);
282+
break;
188283
case 400:
189284
$data = ObjectSerializer::deserialize(
190285
$e->getResponseBody(),
@@ -264,14 +359,24 @@ function ($response) {
264359
*/
265360
public function addDocumentRecipientAsyncWithHttpInfo($id, $documentRecipientCreateRequest)
266361
{
267-
$returnType = '';
362+
$returnType = '\PandaDoc\Client\Model\InlineResponse200';
268363
$request = $this->addDocumentRecipientRequest($id, $documentRecipientCreateRequest);
269364

270365
return $this->client
271366
->sendAsync($request, $this->createHttpClientOption())
272367
->then(
273368
function ($response) use ($returnType) {
274-
return [null, $response->getStatusCode(), $response->getHeaders()];
369+
if ($returnType === '\SplFileObject') {
370+
$content = $response->getBody(); //stream goes to serializer
371+
} else {
372+
$content = (string) $response->getBody();
373+
}
374+
375+
return [
376+
ObjectSerializer::deserialize($content, $returnType, []),
377+
$response->getStatusCode(),
378+
$response->getHeaders()
379+
];
275380
},
276381
function ($exception) {
277382
$response = $exception->getResponse();
@@ -1013,11 +1118,12 @@ public function editDocumentRecipientRequest($id, $recipientId, $documentRecipie
10131118
*
10141119
* @throws \PandaDoc\Client\ApiException on non-2xx response
10151120
* @throws \InvalidArgumentException
1016-
* @return void
1121+
* @return object|object|object|object|object|object
10171122
*/
10181123
public function reassignDocumentRecipient($id, $recipientId, $documentRecipientCreateRequest)
10191124
{
1020-
$this->reassignDocumentRecipientWithHttpInfo($id, $recipientId, $documentRecipientCreateRequest);
1125+
list($response) = $this->reassignDocumentRecipientWithHttpInfo($id, $recipientId, $documentRecipientCreateRequest);
1126+
return $response;
10211127
}
10221128

10231129
/**
@@ -1031,7 +1137,7 @@ public function reassignDocumentRecipient($id, $recipientId, $documentRecipientC
10311137
*
10321138
* @throws \PandaDoc\Client\ApiException on non-2xx response
10331139
* @throws \InvalidArgumentException
1034-
* @return array of null, HTTP status code, HTTP response headers (array of strings)
1140+
* @return array of object|object|object|object|object|object, HTTP status code, HTTP response headers (array of strings)
10351141
*/
10361142
public function reassignDocumentRecipientWithHttpInfo($id, $recipientId, $documentRecipientCreateRequest)
10371143
{
@@ -1072,10 +1178,104 @@ public function reassignDocumentRecipientWithHttpInfo($id, $recipientId, $docume
10721178
);
10731179
}
10741180

1075-
return [null, $statusCode, $response->getHeaders()];
1181+
switch($statusCode) {
1182+
case 200:
1183+
if ('object' === '\SplFileObject') {
1184+
$content = $response->getBody(); //stream goes to serializer
1185+
} else {
1186+
$content = (string) $response->getBody();
1187+
}
1188+
1189+
return [
1190+
ObjectSerializer::deserialize($content, 'object', []),
1191+
$response->getStatusCode(),
1192+
$response->getHeaders()
1193+
];
1194+
case 400:
1195+
if ('object' === '\SplFileObject') {
1196+
$content = $response->getBody(); //stream goes to serializer
1197+
} else {
1198+
$content = (string) $response->getBody();
1199+
}
1200+
1201+
return [
1202+
ObjectSerializer::deserialize($content, 'object', []),
1203+
$response->getStatusCode(),
1204+
$response->getHeaders()
1205+
];
1206+
case 401:
1207+
if ('object' === '\SplFileObject') {
1208+
$content = $response->getBody(); //stream goes to serializer
1209+
} else {
1210+
$content = (string) $response->getBody();
1211+
}
1212+
1213+
return [
1214+
ObjectSerializer::deserialize($content, 'object', []),
1215+
$response->getStatusCode(),
1216+
$response->getHeaders()
1217+
];
1218+
case 403:
1219+
if ('object' === '\SplFileObject') {
1220+
$content = $response->getBody(); //stream goes to serializer
1221+
} else {
1222+
$content = (string) $response->getBody();
1223+
}
1224+
1225+
return [
1226+
ObjectSerializer::deserialize($content, 'object', []),
1227+
$response->getStatusCode(),
1228+
$response->getHeaders()
1229+
];
1230+
case 404:
1231+
if ('object' === '\SplFileObject') {
1232+
$content = $response->getBody(); //stream goes to serializer
1233+
} else {
1234+
$content = (string) $response->getBody();
1235+
}
1236+
1237+
return [
1238+
ObjectSerializer::deserialize($content, 'object', []),
1239+
$response->getStatusCode(),
1240+
$response->getHeaders()
1241+
];
1242+
case 429:
1243+
if ('object' === '\SplFileObject') {
1244+
$content = $response->getBody(); //stream goes to serializer
1245+
} else {
1246+
$content = (string) $response->getBody();
1247+
}
1248+
1249+
return [
1250+
ObjectSerializer::deserialize($content, 'object', []),
1251+
$response->getStatusCode(),
1252+
$response->getHeaders()
1253+
];
1254+
}
1255+
1256+
$returnType = 'object';
1257+
if ($returnType === '\SplFileObject') {
1258+
$content = $response->getBody(); //stream goes to serializer
1259+
} else {
1260+
$content = (string) $response->getBody();
1261+
}
1262+
1263+
return [
1264+
ObjectSerializer::deserialize($content, $returnType, []),
1265+
$response->getStatusCode(),
1266+
$response->getHeaders()
1267+
];
10761268

10771269
} catch (ApiException $e) {
10781270
switch ($e->getCode()) {
1271+
case 200:
1272+
$data = ObjectSerializer::deserialize(
1273+
$e->getResponseBody(),
1274+
'object',
1275+
$e->getResponseHeaders()
1276+
);
1277+
$e->setResponseObject($data);
1278+
break;
10791279
case 400:
10801280
$data = ObjectSerializer::deserialize(
10811281
$e->getResponseBody(),
@@ -1157,14 +1357,24 @@ function ($response) {
11571357
*/
11581358
public function reassignDocumentRecipientAsyncWithHttpInfo($id, $recipientId, $documentRecipientCreateRequest)
11591359
{
1160-
$returnType = '';
1360+
$returnType = 'object';
11611361
$request = $this->reassignDocumentRecipientRequest($id, $recipientId, $documentRecipientCreateRequest);
11621362

11631363
return $this->client
11641364
->sendAsync($request, $this->createHttpClientOption())
11651365
->then(
11661366
function ($response) use ($returnType) {
1167-
return [null, $response->getStatusCode(), $response->getHeaders()];
1367+
if ($returnType === '\SplFileObject') {
1368+
$content = $response->getBody(); //stream goes to serializer
1369+
} else {
1370+
$content = (string) $response->getBody();
1371+
}
1372+
1373+
return [
1374+
ObjectSerializer::deserialize($content, $returnType, []),
1375+
$response->getStatusCode(),
1376+
$response->getHeaders()
1377+
];
11681378
},
11691379
function ($exception) {
11701380
$response = $exception->getResponse();

0 commit comments

Comments
 (0)