Skip to content

Commit e4902c5

Browse files
committed
Release v1.0.12
* Returning whole Booking on moveBooking action.
1 parent da237b5 commit e4902c5

File tree

85 files changed

+136
-98
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+136
-98
lines changed

docs/Api/BookingsApi.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ Name | Type | Description | Notes
193193
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
194194

195195
# **moveBooking**
196-
> moveBooking($body, $facility_id, $doctor_id, $address_id, $booking_id)
196+
> \DocPlanner\Client\Model\Booking moveBooking($body, $facility_id, $doctor_id, $address_id, $booking_id)
197197
198198

199199

@@ -220,7 +220,8 @@ $address_id = "address_id_example"; // string | ID of a doctor`s address in a fa
220220
$booking_id = "booking_id_example"; // string | ID of the Booking
221221

222222
try {
223-
$apiInstance->moveBooking($body, $facility_id, $doctor_id, $address_id, $booking_id);
223+
$result = $apiInstance->moveBooking($body, $facility_id, $doctor_id, $address_id, $booking_id);
224+
print_r($result);
224225
} catch (Exception $e) {
225226
echo 'Exception when calling BookingsApi->moveBooking: ', $e->getMessage(), PHP_EOL;
226227
}
@@ -239,7 +240,7 @@ Name | Type | Description | Notes
239240

240241
### Return type
241242

242-
void (empty response body)
243+
[**\DocPlanner\Client\Model\Booking**](../Model/Booking.md)
243244

244245
### Authorization
245246

@@ -248,7 +249,7 @@ void (empty response body)
248249
### HTTP request headers
249250

250251
- **Content-Type**: application/json
251-
- **Accept**: application/vnd.error+docplanner+json
252+
- **Accept**: application/vnd.docplanner+json; charset=UTF-8, application/vnd.error+docplanner+json
252253

253254
[[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-for-models) [[Back to README]](../../README.md)
254255

lib/Api/APINotificationCallbacksApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/AddressesApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/BookingsApi.php

Lines changed: 47 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24
@@ -1101,11 +1101,12 @@ protected function getBookingsRequest($facility_id, $doctor_id, $address_id, $st
11011101
*
11021102
* @throws \DocPlanner\Client\ApiException on non-2xx response
11031103
* @throws \InvalidArgumentException
1104-
* @return void
1104+
* @return \DocPlanner\Client\Model\Booking
11051105
*/
11061106
public function moveBooking($body, $facility_id, $doctor_id, $address_id, $booking_id)
11071107
{
1108-
$this->moveBookingWithHttpInfo($body, $facility_id, $doctor_id, $address_id, $booking_id);
1108+
list($response) = $this->moveBookingWithHttpInfo($body, $facility_id, $doctor_id, $address_id, $booking_id);
1109+
return $response;
11091110
}
11101111

11111112
/**
@@ -1119,11 +1120,11 @@ public function moveBooking($body, $facility_id, $doctor_id, $address_id, $booki
11191120
*
11201121
* @throws \DocPlanner\Client\ApiException on non-2xx response
11211122
* @throws \InvalidArgumentException
1122-
* @return array of null, HTTP status code, HTTP response headers (array of strings)
1123+
* @return array of \DocPlanner\Client\Model\Booking, HTTP status code, HTTP response headers (array of strings)
11231124
*/
11241125
public function moveBookingWithHttpInfo($body, $facility_id, $doctor_id, $address_id, $booking_id)
11251126
{
1126-
$returnType = '';
1127+
$returnType = '\DocPlanner\Client\Model\Booking';
11271128
$request = $this->moveBookingRequest($body, $facility_id, $doctor_id, $address_id, $booking_id);
11281129

11291130
try {
@@ -1154,10 +1155,32 @@ public function moveBookingWithHttpInfo($body, $facility_id, $doctor_id, $addres
11541155
);
11551156
}
11561157

1157-
return [null, $statusCode, $response->getHeaders()];
1158+
$responseBody = $response->getBody();
1159+
if ($returnType === '\SplFileObject') {
1160+
$content = $responseBody; //stream goes to serializer
1161+
} else {
1162+
$content = $responseBody->getContents();
1163+
if (!in_array($returnType, ['string','integer','bool'])) {
1164+
$content = json_decode($content);
1165+
}
1166+
}
1167+
1168+
return [
1169+
ObjectSerializer::deserialize($content, $returnType, []),
1170+
$response->getStatusCode(),
1171+
$response->getHeaders()
1172+
];
11581173

11591174
} catch (ApiException $e) {
11601175
switch ($e->getCode()) {
1176+
case 201:
1177+
$data = ObjectSerializer::deserialize(
1178+
$e->getResponseBody(),
1179+
'\DocPlanner\Client\Model\Booking',
1180+
$e->getResponseHeaders()
1181+
);
1182+
$e->setResponseObject($data);
1183+
break;
11611184
case 400:
11621185
$data = ObjectSerializer::deserialize(
11631186
$e->getResponseBody(),
@@ -1235,14 +1258,28 @@ function ($response) {
12351258
*/
12361259
public function moveBookingAsyncWithHttpInfo($body, $facility_id, $doctor_id, $address_id, $booking_id)
12371260
{
1238-
$returnType = '';
1261+
$returnType = '\DocPlanner\Client\Model\Booking';
12391262
$request = $this->moveBookingRequest($body, $facility_id, $doctor_id, $address_id, $booking_id);
12401263

12411264
return $this->client
12421265
->sendAsync($request, $this->createHttpClientOption())
12431266
->then(
12441267
function ($response) use ($returnType) {
1245-
return [null, $response->getStatusCode(), $response->getHeaders()];
1268+
$responseBody = $response->getBody();
1269+
if ($returnType === '\SplFileObject') {
1270+
$content = $responseBody; //stream goes to serializer
1271+
} else {
1272+
$content = $responseBody->getContents();
1273+
if ($returnType !== 'string') {
1274+
$content = json_decode($content);
1275+
}
1276+
}
1277+
1278+
return [
1279+
ObjectSerializer::deserialize($content, $returnType, []),
1280+
$response->getStatusCode(),
1281+
$response->getHeaders()
1282+
];
12461283
},
12471284
function ($exception) {
12481285
$response = $exception->getResponse();
@@ -1355,11 +1392,11 @@ protected function moveBookingRequest($body, $facility_id, $doctor_id, $address_
13551392

13561393
if ($multipart) {
13571394
$headers = $this->headerSelector->selectHeadersForMultipart(
1358-
['application/vnd.error+docplanner+json']
1395+
['application/vnd.docplanner+json; charset=UTF-8', 'application/vnd.error+docplanner+json']
13591396
);
13601397
} else {
13611398
$headers = $this->headerSelector->selectHeaders(
1362-
['application/vnd.error+docplanner+json'],
1399+
['application/vnd.docplanner+json; charset=UTF-8', 'application/vnd.error+docplanner+json'],
13631400
['application/json']
13641401
);
13651402
}

lib/Api/CalendarBreaksApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/CalendarsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/DoctorsApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/FacilitiesApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/InsurancesApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

lib/Api/PatientPresenceApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
*
1515
* Welcome to Docplanner Integrations [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) API! This API gives You the ability to build Your own application and integrate it with Docplanner services.
1616
*
17-
* OpenAPI spec version: 1.0.11
17+
* OpenAPI spec version: 1.0.12
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

0 commit comments

Comments
 (0)