Skip to content

Commit 09b6af2

Browse files
committed
Release v1.11.0
* Introducing new **removeAddressIntegration** endpoint for DocplannerPMS API clients
1 parent 962a418 commit 09b6af2

123 files changed

Lines changed: 459 additions & 123 deletions

File tree

Some content is hidden

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

docs/Api/AddressesApi.md

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Method | HTTP request | Description
66
------------- | ------------- | -------------
77
[**getAddress**](AddressesApi.md#getaddress) | **GET** /facilities/{facility_id}/doctors/{doctor_id}/addresses/{address_id} |
88
[**getAddresses**](AddressesApi.md#getaddresses) | **GET** /facilities/{facility_id}/doctors/{doctor_id}/addresses |
9+
[**removeAddressIntegration**](AddressesApi.md#removeaddressintegration) | **DELETE** /facilities/{facility_id}/doctors/{doctor_id}/addresses/{address_id}/integration |
910
[**updateAddress**](AddressesApi.md#updateaddress) | **PATCH** /facilities/{facility_id}/doctors/{doctor_id}/addresses/{address_id} |
1011

1112
# **getAddress**
@@ -124,6 +125,62 @@ Name | Type | Description | Notes
124125

125126
[[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)
126127

128+
# **removeAddressIntegration**
129+
> removeAddressIntegration($facility_id, $doctor_id, $address_id)
130+
131+
132+
133+
Remove the integration mark from a single address. After this call, Docplanner will no longer treat the address as integrated with the API client's system. The address itself is not deleted. **Endpoint is dedicated for DocplannerPMS API clients only.**
134+
135+
### Example
136+
```php
137+
<?php
138+
require_once(__DIR__ . '/vendor/autoload.php');
139+
140+
// Configure OAuth2 access token for authorization: oauth2
141+
$config = DocPlanner\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
142+
143+
$apiInstance = new DocPlanner\Client\Api\AddressesApi(
144+
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
145+
// This is optional, `GuzzleHttp\Client` will be used as default.
146+
new GuzzleHttp\Client(),
147+
$config
148+
);
149+
$facility_id = "facility_id_example"; // string | ID of the Facility
150+
$doctor_id = "doctor_id_example"; // string | ID of a doctor in a facility
151+
$address_id = "address_id_example"; // string | ID of a doctor`s address in a facility
152+
153+
try {
154+
$apiInstance->removeAddressIntegration($facility_id, $doctor_id, $address_id);
155+
} catch (Exception $e) {
156+
echo 'Exception when calling AddressesApi->removeAddressIntegration: ', $e->getMessage(), PHP_EOL;
157+
}
158+
?>
159+
```
160+
161+
### Parameters
162+
163+
Name | Type | Description | Notes
164+
------------- | ------------- | ------------- | -------------
165+
**facility_id** | **string**| ID of the Facility |
166+
**doctor_id** | **string**| ID of a doctor in a facility |
167+
**address_id** | **string**| ID of a doctor&#x60;s address in a facility |
168+
169+
### Return type
170+
171+
void (empty response body)
172+
173+
### Authorization
174+
175+
[oauth2](../../README.md#oauth2)
176+
177+
### HTTP request headers
178+
179+
- **Content-Type**: Not defined
180+
- **Accept**: application/vnd.error+docplanner+json
181+
182+
[[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)
183+
127184
# **updateAddress**
128185
> \DocPlanner\Client\Model\Address updateAddress($body, $facility_id, $doctor_id, $address_id)
129186

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.10.0
17+
* OpenAPI spec version: 1.11.0
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: 280 additions & 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.10.0
17+
* OpenAPI spec version: 1.11.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24
@@ -717,6 +717,285 @@ protected function getAddressesRequest($facility_id, $doctor_id, $with = null)
717717
);
718718
}
719719

720+
/**
721+
* Operation removeAddressIntegration
722+
*
723+
* @param string $facility_id ID of the Facility (required)
724+
* @param string $doctor_id ID of a doctor in a facility (required)
725+
* @param string $address_id ID of a doctor&#x60;s address in a facility (required)
726+
*
727+
* @throws \DocPlanner\Client\ApiException on non-2xx response
728+
* @throws \InvalidArgumentException
729+
* @return void
730+
*/
731+
public function removeAddressIntegration($facility_id, $doctor_id, $address_id)
732+
{
733+
$this->removeAddressIntegrationWithHttpInfo($facility_id, $doctor_id, $address_id);
734+
}
735+
736+
/**
737+
* Operation removeAddressIntegrationWithHttpInfo
738+
*
739+
* @param string $facility_id ID of the Facility (required)
740+
* @param string $doctor_id ID of a doctor in a facility (required)
741+
* @param string $address_id ID of a doctor&#x60;s address in a facility (required)
742+
*
743+
* @throws \DocPlanner\Client\ApiException on non-2xx response
744+
* @throws \InvalidArgumentException
745+
* @return array of null, HTTP status code, HTTP response headers (array of strings)
746+
*/
747+
public function removeAddressIntegrationWithHttpInfo($facility_id, $doctor_id, $address_id)
748+
{
749+
$returnType = '';
750+
$request = $this->removeAddressIntegrationRequest($facility_id, $doctor_id, $address_id);
751+
752+
try {
753+
$options = $this->createHttpClientOption();
754+
try {
755+
$response = $this->client->send($request, $options);
756+
} catch (RequestException $e) {
757+
throw new ApiException(
758+
"[{$e->getCode()}] {$e->getMessage()}",
759+
$e->getCode(),
760+
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
761+
$e->getResponse() ? $e->getResponse()->getBody()->getContents() : null
762+
);
763+
}
764+
765+
$statusCode = $response->getStatusCode();
766+
767+
if ($statusCode < 200 || $statusCode > 299) {
768+
throw new ApiException(
769+
sprintf(
770+
'[%d] Error connecting to the API (%s)',
771+
$statusCode,
772+
$request->getUri()
773+
),
774+
$statusCode,
775+
$response->getHeaders(),
776+
$response->getBody()
777+
);
778+
}
779+
780+
return [null, $statusCode, $response->getHeaders()];
781+
782+
} catch (ApiException $e) {
783+
switch ($e->getCode()) {
784+
case 403:
785+
$data = ObjectSerializer::deserialize(
786+
$e->getResponseBody(),
787+
'\DocPlanner\Client\Model\Error',
788+
$e->getResponseHeaders()
789+
);
790+
$e->setResponseObject($data);
791+
break;
792+
case 404:
793+
$data = ObjectSerializer::deserialize(
794+
$e->getResponseBody(),
795+
'\DocPlanner\Client\Model\Error',
796+
$e->getResponseHeaders()
797+
);
798+
$e->setResponseObject($data);
799+
break;
800+
}
801+
throw $e;
802+
}
803+
}
804+
805+
/**
806+
* Operation removeAddressIntegrationAsync
807+
*
808+
*
809+
*
810+
* @param string $facility_id ID of the Facility (required)
811+
* @param string $doctor_id ID of a doctor in a facility (required)
812+
* @param string $address_id ID of a doctor&#x60;s address in a facility (required)
813+
*
814+
* @throws \InvalidArgumentException
815+
* @return \GuzzleHttp\Promise\PromiseInterface
816+
*/
817+
public function removeAddressIntegrationAsync($facility_id, $doctor_id, $address_id)
818+
{
819+
return $this->removeAddressIntegrationAsyncWithHttpInfo($facility_id, $doctor_id, $address_id)
820+
->then(
821+
function ($response) {
822+
return $response[0];
823+
}
824+
);
825+
}
826+
827+
/**
828+
* Operation removeAddressIntegrationAsyncWithHttpInfo
829+
*
830+
*
831+
*
832+
* @param string $facility_id ID of the Facility (required)
833+
* @param string $doctor_id ID of a doctor in a facility (required)
834+
* @param string $address_id ID of a doctor&#x60;s address in a facility (required)
835+
*
836+
* @throws \InvalidArgumentException
837+
* @return \GuzzleHttp\Promise\PromiseInterface
838+
*/
839+
public function removeAddressIntegrationAsyncWithHttpInfo($facility_id, $doctor_id, $address_id)
840+
{
841+
$returnType = '';
842+
$request = $this->removeAddressIntegrationRequest($facility_id, $doctor_id, $address_id);
843+
844+
return $this->client
845+
->sendAsync($request, $this->createHttpClientOption())
846+
->then(
847+
function ($response) use ($returnType) {
848+
return [null, $response->getStatusCode(), $response->getHeaders()];
849+
},
850+
function ($exception) {
851+
$response = $exception->getResponse();
852+
$statusCode = $response->getStatusCode();
853+
throw new ApiException(
854+
sprintf(
855+
'[%d] Error connecting to the API (%s)',
856+
$statusCode,
857+
$exception->getRequest()->getUri()
858+
),
859+
$statusCode,
860+
$response->getHeaders(),
861+
$response->getBody()
862+
);
863+
}
864+
);
865+
}
866+
867+
/**
868+
* Create request for operation 'removeAddressIntegration'
869+
*
870+
* @param string $facility_id ID of the Facility (required)
871+
* @param string $doctor_id ID of a doctor in a facility (required)
872+
* @param string $address_id ID of a doctor&#x60;s address in a facility (required)
873+
*
874+
* @throws \InvalidArgumentException
875+
* @return \GuzzleHttp\Psr7\Request
876+
*/
877+
protected function removeAddressIntegrationRequest($facility_id, $doctor_id, $address_id)
878+
{
879+
// verify the required parameter 'facility_id' is set
880+
if ($facility_id === null || (is_array($facility_id) && count($facility_id) === 0)) {
881+
throw new \InvalidArgumentException(
882+
'Missing the required parameter $facility_id when calling removeAddressIntegration'
883+
);
884+
}
885+
// verify the required parameter 'doctor_id' is set
886+
if ($doctor_id === null || (is_array($doctor_id) && count($doctor_id) === 0)) {
887+
throw new \InvalidArgumentException(
888+
'Missing the required parameter $doctor_id when calling removeAddressIntegration'
889+
);
890+
}
891+
// verify the required parameter 'address_id' is set
892+
if ($address_id === null || (is_array($address_id) && count($address_id) === 0)) {
893+
throw new \InvalidArgumentException(
894+
'Missing the required parameter $address_id when calling removeAddressIntegration'
895+
);
896+
}
897+
898+
$resourcePath = '/facilities/{facility_id}/doctors/{doctor_id}/addresses/{address_id}/integration';
899+
$formParams = [];
900+
$queryParams = [];
901+
$headerParams = [];
902+
$httpBody = '';
903+
$multipart = false;
904+
905+
906+
// path params
907+
if ($facility_id !== null) {
908+
$resourcePath = str_replace(
909+
'{' . 'facility_id' . '}',
910+
ObjectSerializer::toPathValue($facility_id),
911+
$resourcePath
912+
);
913+
}
914+
// path params
915+
if ($doctor_id !== null) {
916+
$resourcePath = str_replace(
917+
'{' . 'doctor_id' . '}',
918+
ObjectSerializer::toPathValue($doctor_id),
919+
$resourcePath
920+
);
921+
}
922+
// path params
923+
if ($address_id !== null) {
924+
$resourcePath = str_replace(
925+
'{' . 'address_id' . '}',
926+
ObjectSerializer::toPathValue($address_id),
927+
$resourcePath
928+
);
929+
}
930+
931+
// body params
932+
$_tempBody = null;
933+
934+
if ($multipart) {
935+
$headers = $this->headerSelector->selectHeadersForMultipart(
936+
['application/vnd.error+docplanner+json']
937+
);
938+
} else {
939+
$headers = $this->headerSelector->selectHeaders(
940+
['application/vnd.error+docplanner+json'],
941+
[]
942+
);
943+
}
944+
945+
// for model (json/xml)
946+
if (isset($_tempBody)) {
947+
// $_tempBody is the method argument, if present
948+
$httpBody = $_tempBody;
949+
// \stdClass has no __toString(), so we should encode it manually
950+
if ($httpBody instanceof \stdClass && $headers['Content-Type'] === 'application/json') {
951+
$httpBody = \GuzzleHttp\json_encode($httpBody);
952+
}
953+
} elseif (count($formParams) > 0) {
954+
if ($multipart) {
955+
$multipartContents = [];
956+
foreach ($formParams as $formParamName => $formParamValue) {
957+
$multipartContents[] = [
958+
'name' => $formParamName,
959+
'contents' => $formParamValue
960+
];
961+
}
962+
// for HTTP post (form)
963+
$httpBody = new MultipartStream($multipartContents);
964+
965+
} elseif ($headers['Content-Type'] === 'application/json') {
966+
$httpBody = \GuzzleHttp\json_encode($formParams);
967+
968+
} else {
969+
// for HTTP post (form)
970+
$httpBody = $this->buildQuery($formParams);
971+
}
972+
}
973+
974+
// this endpoint requires OAuth (access token)
975+
if ($this->config->getAccessToken() !== null) {
976+
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
977+
}
978+
979+
$defaultHeaders = [];
980+
if ($this->config->getUserAgent()) {
981+
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
982+
}
983+
984+
$headers = array_merge(
985+
$defaultHeaders,
986+
$headerParams,
987+
$headers
988+
);
989+
990+
$query = $this->buildQuery($queryParams);
991+
return new Request(
992+
'DELETE',
993+
$this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
994+
$headers,
995+
$httpBody
996+
);
997+
}
998+
720999
/**
7211000
* Operation updateAddress
7221001
*

lib/Api/BookingsApi.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.10.0
17+
* OpenAPI spec version: 1.11.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

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.10.0
17+
* OpenAPI spec version: 1.11.0
1818
*
1919
* Generated by: https://github.com/swagger-api/swagger-codegen.git
2020
* Swagger Codegen version: 3.0.24

0 commit comments

Comments
 (0)