Add kilometer-based Fahrtkosten billing, self-service distance entry, role deletion
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 16s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Successful in 5s
Docker-Images bauen und veröffentlichen / build (, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 19s
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 16s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Successful in 5s
Docker-Images bauen und veröffentlichen / build (, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 19s
- Facility: TravelCostMode (Pauschale/ProKilometer) + TravelCostPerKm, alongside the existing flat rate; fixes FacilityService.UpdateAsync silently dropping all Konditionen fields on update. - New EmployeeFacilityDistance (Mitarbeiter x Einrichtung -> km) with full office-side CRUD in omsorgapp, plus a self-service endpoint/UI so field staff can maintain their own commute distance via OMSORG Connect (new ModuleType.EmployeeFacilityDistances, Own-scope, no Facilities access needed). - Roles can now be deleted (blocked with a 409 while still assigned to a user). - Fix employeesApi.js missing the Date-object conversion for dateOfBirth/entryDate/ exitDate that crashed employee creation whenever a date was filled in; add a clear/remove control for those date fields. - Requirements: flesh out FR-REC-3 with a staged Akquise cadence, add FR-REC-5/6 for CRM feature scope and success metrics. - Regenerate api-client-ts and api-client-php for all of the above. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
09dce2ab98
commit
ffa2c4a9e7
@@ -10,11 +10,13 @@ docs/Api/AuditLogApi.md
|
||||
docs/Api/AuthApi.md
|
||||
docs/Api/ContractsApi.md
|
||||
docs/Api/DocumentsApi.md
|
||||
docs/Api/EmployeeFacilityDistancesApi.md
|
||||
docs/Api/EmployeesApi.md
|
||||
docs/Api/FacilitiesApi.md
|
||||
docs/Api/FacilityContactsApi.md
|
||||
docs/Api/FacilityQualificationRatesApi.md
|
||||
docs/Api/HealthApi.md
|
||||
docs/Api/MyFacilityDistancesApi.md
|
||||
docs/Api/OrdersApi.md
|
||||
docs/Api/RolesApi.md
|
||||
docs/Api/TimeEntriesApi.md
|
||||
@@ -33,19 +35,23 @@ docs/Model/ContractResponse.md
|
||||
docs/Model/ContractResponsePagedResponse.md
|
||||
docs/Model/CreateAbsenceRequest.md
|
||||
docs/Model/CreateContractRequest.md
|
||||
docs/Model/CreateEmployeeFacilityDistanceRequest.md
|
||||
docs/Model/CreateEmployeeRequest.md
|
||||
docs/Model/CreateFacilityContactRequest.md
|
||||
docs/Model/CreateFacilityQualificationRateRequest.md
|
||||
docs/Model/CreateFacilityRequest.md
|
||||
docs/Model/CreateMyFacilityDistanceRequest.md
|
||||
docs/Model/CreateOrderRequest.md
|
||||
docs/Model/CreateRoleRequest.md
|
||||
docs/Model/CreateTimeEntryRequest.md
|
||||
docs/Model/CreateUserRequest.md
|
||||
docs/Model/CreateValueListItemRequest.md
|
||||
docs/Model/DocumentResponse.md
|
||||
docs/Model/EmployeeFacilityDistanceResponse.md
|
||||
docs/Model/EmployeeResponse.md
|
||||
docs/Model/EmployeeResponsePagedResponse.md
|
||||
docs/Model/FacilityContactResponse.md
|
||||
docs/Model/FacilityOptionResponse.md
|
||||
docs/Model/FacilityQualificationRateResponse.md
|
||||
docs/Model/FacilityResponse.md
|
||||
docs/Model/FacilityResponsePagedResponse.md
|
||||
@@ -59,6 +65,7 @@ docs/Model/LoginResponse.md
|
||||
docs/Model/LogoutRequest.md
|
||||
docs/Model/MeResponse.md
|
||||
docs/Model/ModuleType.md
|
||||
docs/Model/MyFacilityDistanceResponse.md
|
||||
docs/Model/OrderResponse.md
|
||||
docs/Model/OrderResponsePagedResponse.md
|
||||
docs/Model/PasswordPolicyResponse.md
|
||||
@@ -78,6 +85,7 @@ docs/Model/TimeEntryResponse.md
|
||||
docs/Model/TimeEntryResponsePagedResponse.md
|
||||
docs/Model/TrashAbsenceResponse.md
|
||||
docs/Model/TrashContractResponse.md
|
||||
docs/Model/TrashEmployeeFacilityDistanceResponse.md
|
||||
docs/Model/TrashEmployeeResponse.md
|
||||
docs/Model/TrashFacilityContactResponse.md
|
||||
docs/Model/TrashFacilityQualificationRateResponse.md
|
||||
@@ -87,10 +95,12 @@ docs/Model/TrashTimeEntryResponse.md
|
||||
docs/Model/UpdateAbsenceRequest.md
|
||||
docs/Model/UpdateContractRequest.md
|
||||
docs/Model/UpdateDocumentRequest.md
|
||||
docs/Model/UpdateEmployeeFacilityDistanceRequest.md
|
||||
docs/Model/UpdateEmployeeRequest.md
|
||||
docs/Model/UpdateFacilityContactRequest.md
|
||||
docs/Model/UpdateFacilityQualificationRateRequest.md
|
||||
docs/Model/UpdateFacilityRequest.md
|
||||
docs/Model/UpdateMyFacilityDistanceRequest.md
|
||||
docs/Model/UpdateOrderRequest.md
|
||||
docs/Model/UpdateRolePermissionsRequest.md
|
||||
docs/Model/UpdateTimeEntryRequest.md
|
||||
@@ -111,11 +121,13 @@ lib/Api/AuditLogApi.php
|
||||
lib/Api/AuthApi.php
|
||||
lib/Api/ContractsApi.php
|
||||
lib/Api/DocumentsApi.php
|
||||
lib/Api/EmployeeFacilityDistancesApi.php
|
||||
lib/Api/EmployeesApi.php
|
||||
lib/Api/FacilitiesApi.php
|
||||
lib/Api/FacilityContactsApi.php
|
||||
lib/Api/FacilityQualificationRatesApi.php
|
||||
lib/Api/HealthApi.php
|
||||
lib/Api/MyFacilityDistancesApi.php
|
||||
lib/Api/OrdersApi.php
|
||||
lib/Api/RolesApi.php
|
||||
lib/Api/TimeEntriesApi.php
|
||||
@@ -138,19 +150,23 @@ lib/Model/ContractResponse.php
|
||||
lib/Model/ContractResponsePagedResponse.php
|
||||
lib/Model/CreateAbsenceRequest.php
|
||||
lib/Model/CreateContractRequest.php
|
||||
lib/Model/CreateEmployeeFacilityDistanceRequest.php
|
||||
lib/Model/CreateEmployeeRequest.php
|
||||
lib/Model/CreateFacilityContactRequest.php
|
||||
lib/Model/CreateFacilityQualificationRateRequest.php
|
||||
lib/Model/CreateFacilityRequest.php
|
||||
lib/Model/CreateMyFacilityDistanceRequest.php
|
||||
lib/Model/CreateOrderRequest.php
|
||||
lib/Model/CreateRoleRequest.php
|
||||
lib/Model/CreateTimeEntryRequest.php
|
||||
lib/Model/CreateUserRequest.php
|
||||
lib/Model/CreateValueListItemRequest.php
|
||||
lib/Model/DocumentResponse.php
|
||||
lib/Model/EmployeeFacilityDistanceResponse.php
|
||||
lib/Model/EmployeeResponse.php
|
||||
lib/Model/EmployeeResponsePagedResponse.php
|
||||
lib/Model/FacilityContactResponse.php
|
||||
lib/Model/FacilityOptionResponse.php
|
||||
lib/Model/FacilityQualificationRateResponse.php
|
||||
lib/Model/FacilityResponse.php
|
||||
lib/Model/FacilityResponsePagedResponse.php
|
||||
@@ -165,6 +181,7 @@ lib/Model/LogoutRequest.php
|
||||
lib/Model/MeResponse.php
|
||||
lib/Model/ModelInterface.php
|
||||
lib/Model/ModuleType.php
|
||||
lib/Model/MyFacilityDistanceResponse.php
|
||||
lib/Model/OrderResponse.php
|
||||
lib/Model/OrderResponsePagedResponse.php
|
||||
lib/Model/PasswordPolicyResponse.php
|
||||
@@ -184,6 +201,7 @@ lib/Model/TimeEntryResponse.php
|
||||
lib/Model/TimeEntryResponsePagedResponse.php
|
||||
lib/Model/TrashAbsenceResponse.php
|
||||
lib/Model/TrashContractResponse.php
|
||||
lib/Model/TrashEmployeeFacilityDistanceResponse.php
|
||||
lib/Model/TrashEmployeeResponse.php
|
||||
lib/Model/TrashFacilityContactResponse.php
|
||||
lib/Model/TrashFacilityQualificationRateResponse.php
|
||||
@@ -193,10 +211,12 @@ lib/Model/TrashTimeEntryResponse.php
|
||||
lib/Model/UpdateAbsenceRequest.php
|
||||
lib/Model/UpdateContractRequest.php
|
||||
lib/Model/UpdateDocumentRequest.php
|
||||
lib/Model/UpdateEmployeeFacilityDistanceRequest.php
|
||||
lib/Model/UpdateEmployeeRequest.php
|
||||
lib/Model/UpdateFacilityContactRequest.php
|
||||
lib/Model/UpdateFacilityQualificationRateRequest.php
|
||||
lib/Model/UpdateFacilityRequest.php
|
||||
lib/Model/UpdateMyFacilityDistanceRequest.php
|
||||
lib/Model/UpdateOrderRequest.php
|
||||
lib/Model/UpdateRolePermissionsRequest.php
|
||||
lib/Model/UpdateTimeEntryRequest.php
|
||||
@@ -211,3 +231,13 @@ lib/Model/ValueListTransitionResponse.php
|
||||
lib/Model/ValueListUsageResponse.php
|
||||
lib/ObjectSerializer.php
|
||||
phpunit.xml.dist
|
||||
test/Api/EmployeeFacilityDistancesApiTest.php
|
||||
test/Api/MyFacilityDistancesApiTest.php
|
||||
test/Model/CreateEmployeeFacilityDistanceRequestTest.php
|
||||
test/Model/CreateMyFacilityDistanceRequestTest.php
|
||||
test/Model/EmployeeFacilityDistanceResponseTest.php
|
||||
test/Model/FacilityOptionResponseTest.php
|
||||
test/Model/MyFacilityDistanceResponseTest.php
|
||||
test/Model/TrashEmployeeFacilityDistanceResponseTest.php
|
||||
test/Model/UpdateEmployeeFacilityDistanceRequestTest.php
|
||||
test/Model/UpdateMyFacilityDistanceRequestTest.php
|
||||
|
||||
@@ -110,6 +110,10 @@ Class | Method | HTTP request | Description
|
||||
*DocumentsApi* | [**apiDocumentsIdDownloadGet**](docs/Api/DocumentsApi.md#apidocumentsiddownloadget) | **GET** /api/documents/{id}/download |
|
||||
*DocumentsApi* | [**apiDocumentsIdPut**](docs/Api/DocumentsApi.md#apidocumentsidput) | **PUT** /api/documents/{id} |
|
||||
*DocumentsApi* | [**apiDocumentsPost**](docs/Api/DocumentsApi.md#apidocumentspost) | **POST** /api/documents |
|
||||
*EmployeeFacilityDistancesApi* | [**apiFacilitiesFacilityIdEmployeeDistancesGet**](docs/Api/EmployeeFacilityDistancesApi.md#apifacilitiesfacilityidemployeedistancesget) | **GET** /api/facilities/{facilityId}/employee-distances |
|
||||
*EmployeeFacilityDistancesApi* | [**apiFacilitiesFacilityIdEmployeeDistancesIdDelete**](docs/Api/EmployeeFacilityDistancesApi.md#apifacilitiesfacilityidemployeedistancesiddelete) | **DELETE** /api/facilities/{facilityId}/employee-distances/{id} |
|
||||
*EmployeeFacilityDistancesApi* | [**apiFacilitiesFacilityIdEmployeeDistancesIdPut**](docs/Api/EmployeeFacilityDistancesApi.md#apifacilitiesfacilityidemployeedistancesidput) | **PUT** /api/facilities/{facilityId}/employee-distances/{id} |
|
||||
*EmployeeFacilityDistancesApi* | [**apiFacilitiesFacilityIdEmployeeDistancesPost**](docs/Api/EmployeeFacilityDistancesApi.md#apifacilitiesfacilityidemployeedistancespost) | **POST** /api/facilities/{facilityId}/employee-distances |
|
||||
*EmployeesApi* | [**apiEmployeesGet**](docs/Api/EmployeesApi.md#apiemployeesget) | **GET** /api/employees |
|
||||
*EmployeesApi* | [**apiEmployeesIdDelete**](docs/Api/EmployeesApi.md#apiemployeesiddelete) | **DELETE** /api/employees/{id} |
|
||||
*EmployeesApi* | [**apiEmployeesIdGet**](docs/Api/EmployeesApi.md#apiemployeesidget) | **GET** /api/employees/{id} |
|
||||
@@ -129,6 +133,10 @@ Class | Method | HTTP request | Description
|
||||
*FacilityQualificationRatesApi* | [**apiFacilitiesFacilityIdQualificationRatesIdPut**](docs/Api/FacilityQualificationRatesApi.md#apifacilitiesfacilityidqualificationratesidput) | **PUT** /api/facilities/{facilityId}/qualification-rates/{id} |
|
||||
*FacilityQualificationRatesApi* | [**apiFacilitiesFacilityIdQualificationRatesPost**](docs/Api/FacilityQualificationRatesApi.md#apifacilitiesfacilityidqualificationratespost) | **POST** /api/facilities/{facilityId}/qualification-rates |
|
||||
*HealthApi* | [**apiHealthGet**](docs/Api/HealthApi.md#apihealthget) | **GET** /api/health |
|
||||
*MyFacilityDistancesApi* | [**apiMeFacilityDistancesFacilitiesGet**](docs/Api/MyFacilityDistancesApi.md#apimefacilitydistancesfacilitiesget) | **GET** /api/me/facility-distances/facilities |
|
||||
*MyFacilityDistancesApi* | [**apiMeFacilityDistancesGet**](docs/Api/MyFacilityDistancesApi.md#apimefacilitydistancesget) | **GET** /api/me/facility-distances |
|
||||
*MyFacilityDistancesApi* | [**apiMeFacilityDistancesIdPut**](docs/Api/MyFacilityDistancesApi.md#apimefacilitydistancesidput) | **PUT** /api/me/facility-distances/{id} |
|
||||
*MyFacilityDistancesApi* | [**apiMeFacilityDistancesPost**](docs/Api/MyFacilityDistancesApi.md#apimefacilitydistancespost) | **POST** /api/me/facility-distances |
|
||||
*OrdersApi* | [**apiOrdersGet**](docs/Api/OrdersApi.md#apiordersget) | **GET** /api/orders |
|
||||
*OrdersApi* | [**apiOrdersIdDelete**](docs/Api/OrdersApi.md#apiordersiddelete) | **DELETE** /api/orders/{id} |
|
||||
*OrdersApi* | [**apiOrdersIdGet**](docs/Api/OrdersApi.md#apiordersidget) | **GET** /api/orders/{id} |
|
||||
@@ -149,6 +157,8 @@ Class | Method | HTTP request | Description
|
||||
*TrashApi* | [**apiTrashAbsencesIdRestorePost**](docs/Api/TrashApi.md#apitrashabsencesidrestorepost) | **POST** /api/trash/absences/{id}/restore |
|
||||
*TrashApi* | [**apiTrashContractsGet**](docs/Api/TrashApi.md#apitrashcontractsget) | **GET** /api/trash/contracts |
|
||||
*TrashApi* | [**apiTrashContractsIdRestorePost**](docs/Api/TrashApi.md#apitrashcontractsidrestorepost) | **POST** /api/trash/contracts/{id}/restore |
|
||||
*TrashApi* | [**apiTrashEmployeeFacilityDistancesGet**](docs/Api/TrashApi.md#apitrashemployeefacilitydistancesget) | **GET** /api/trash/employee-facility-distances |
|
||||
*TrashApi* | [**apiTrashEmployeeFacilityDistancesIdRestorePost**](docs/Api/TrashApi.md#apitrashemployeefacilitydistancesidrestorepost) | **POST** /api/trash/employee-facility-distances/{id}/restore |
|
||||
*TrashApi* | [**apiTrashEmployeesGet**](docs/Api/TrashApi.md#apitrashemployeesget) | **GET** /api/trash/employees |
|
||||
*TrashApi* | [**apiTrashEmployeesIdRestorePost**](docs/Api/TrashApi.md#apitrashemployeesidrestorepost) | **POST** /api/trash/employees/{id}/restore |
|
||||
*TrashApi* | [**apiTrashFacilitiesGet**](docs/Api/TrashApi.md#apitrashfacilitiesget) | **GET** /api/trash/facilities |
|
||||
@@ -191,19 +201,23 @@ Class | Method | HTTP request | Description
|
||||
- [ContractResponsePagedResponse](docs/Model/ContractResponsePagedResponse.md)
|
||||
- [CreateAbsenceRequest](docs/Model/CreateAbsenceRequest.md)
|
||||
- [CreateContractRequest](docs/Model/CreateContractRequest.md)
|
||||
- [CreateEmployeeFacilityDistanceRequest](docs/Model/CreateEmployeeFacilityDistanceRequest.md)
|
||||
- [CreateEmployeeRequest](docs/Model/CreateEmployeeRequest.md)
|
||||
- [CreateFacilityContactRequest](docs/Model/CreateFacilityContactRequest.md)
|
||||
- [CreateFacilityQualificationRateRequest](docs/Model/CreateFacilityQualificationRateRequest.md)
|
||||
- [CreateFacilityRequest](docs/Model/CreateFacilityRequest.md)
|
||||
- [CreateMyFacilityDistanceRequest](docs/Model/CreateMyFacilityDistanceRequest.md)
|
||||
- [CreateOrderRequest](docs/Model/CreateOrderRequest.md)
|
||||
- [CreateRoleRequest](docs/Model/CreateRoleRequest.md)
|
||||
- [CreateTimeEntryRequest](docs/Model/CreateTimeEntryRequest.md)
|
||||
- [CreateUserRequest](docs/Model/CreateUserRequest.md)
|
||||
- [CreateValueListItemRequest](docs/Model/CreateValueListItemRequest.md)
|
||||
- [DocumentResponse](docs/Model/DocumentResponse.md)
|
||||
- [EmployeeFacilityDistanceResponse](docs/Model/EmployeeFacilityDistanceResponse.md)
|
||||
- [EmployeeResponse](docs/Model/EmployeeResponse.md)
|
||||
- [EmployeeResponsePagedResponse](docs/Model/EmployeeResponsePagedResponse.md)
|
||||
- [FacilityContactResponse](docs/Model/FacilityContactResponse.md)
|
||||
- [FacilityOptionResponse](docs/Model/FacilityOptionResponse.md)
|
||||
- [FacilityQualificationRateResponse](docs/Model/FacilityQualificationRateResponse.md)
|
||||
- [FacilityResponse](docs/Model/FacilityResponse.md)
|
||||
- [FacilityResponsePagedResponse](docs/Model/FacilityResponsePagedResponse.md)
|
||||
@@ -217,6 +231,7 @@ Class | Method | HTTP request | Description
|
||||
- [LogoutRequest](docs/Model/LogoutRequest.md)
|
||||
- [MeResponse](docs/Model/MeResponse.md)
|
||||
- [ModuleType](docs/Model/ModuleType.md)
|
||||
- [MyFacilityDistanceResponse](docs/Model/MyFacilityDistanceResponse.md)
|
||||
- [OrderResponse](docs/Model/OrderResponse.md)
|
||||
- [OrderResponsePagedResponse](docs/Model/OrderResponsePagedResponse.md)
|
||||
- [PasswordPolicyResponse](docs/Model/PasswordPolicyResponse.md)
|
||||
@@ -236,6 +251,7 @@ Class | Method | HTTP request | Description
|
||||
- [TimeEntryResponsePagedResponse](docs/Model/TimeEntryResponsePagedResponse.md)
|
||||
- [TrashAbsenceResponse](docs/Model/TrashAbsenceResponse.md)
|
||||
- [TrashContractResponse](docs/Model/TrashContractResponse.md)
|
||||
- [TrashEmployeeFacilityDistanceResponse](docs/Model/TrashEmployeeFacilityDistanceResponse.md)
|
||||
- [TrashEmployeeResponse](docs/Model/TrashEmployeeResponse.md)
|
||||
- [TrashFacilityContactResponse](docs/Model/TrashFacilityContactResponse.md)
|
||||
- [TrashFacilityQualificationRateResponse](docs/Model/TrashFacilityQualificationRateResponse.md)
|
||||
@@ -245,10 +261,12 @@ Class | Method | HTTP request | Description
|
||||
- [UpdateAbsenceRequest](docs/Model/UpdateAbsenceRequest.md)
|
||||
- [UpdateContractRequest](docs/Model/UpdateContractRequest.md)
|
||||
- [UpdateDocumentRequest](docs/Model/UpdateDocumentRequest.md)
|
||||
- [UpdateEmployeeFacilityDistanceRequest](docs/Model/UpdateEmployeeFacilityDistanceRequest.md)
|
||||
- [UpdateEmployeeRequest](docs/Model/UpdateEmployeeRequest.md)
|
||||
- [UpdateFacilityContactRequest](docs/Model/UpdateFacilityContactRequest.md)
|
||||
- [UpdateFacilityQualificationRateRequest](docs/Model/UpdateFacilityQualificationRateRequest.md)
|
||||
- [UpdateFacilityRequest](docs/Model/UpdateFacilityRequest.md)
|
||||
- [UpdateMyFacilityDistanceRequest](docs/Model/UpdateMyFacilityDistanceRequest.md)
|
||||
- [UpdateOrderRequest](docs/Model/UpdateOrderRequest.md)
|
||||
- [UpdateRolePermissionsRequest](docs/Model/UpdateRolePermissionsRequest.md)
|
||||
- [UpdateTimeEntryRequest](docs/Model/UpdateTimeEntryRequest.md)
|
||||
|
||||
@@ -0,0 +1,250 @@
|
||||
# OmsorgCoreClient\EmployeeFacilityDistancesApi
|
||||
|
||||
All URIs are relative to http://localhost, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**apiFacilitiesFacilityIdEmployeeDistancesGet()**](EmployeeFacilityDistancesApi.md#apiFacilitiesFacilityIdEmployeeDistancesGet) | **GET** /api/facilities/{facilityId}/employee-distances | |
|
||||
| [**apiFacilitiesFacilityIdEmployeeDistancesIdDelete()**](EmployeeFacilityDistancesApi.md#apiFacilitiesFacilityIdEmployeeDistancesIdDelete) | **DELETE** /api/facilities/{facilityId}/employee-distances/{id} | |
|
||||
| [**apiFacilitiesFacilityIdEmployeeDistancesIdPut()**](EmployeeFacilityDistancesApi.md#apiFacilitiesFacilityIdEmployeeDistancesIdPut) | **PUT** /api/facilities/{facilityId}/employee-distances/{id} | |
|
||||
| [**apiFacilitiesFacilityIdEmployeeDistancesPost()**](EmployeeFacilityDistancesApi.md#apiFacilitiesFacilityIdEmployeeDistancesPost) | **POST** /api/facilities/{facilityId}/employee-distances | |
|
||||
|
||||
|
||||
## `apiFacilitiesFacilityIdEmployeeDistancesGet()`
|
||||
|
||||
```php
|
||||
apiFacilitiesFacilityIdEmployeeDistancesGet($facility_id): \OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse[]
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\EmployeeFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$facility_id = 'facility_id_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiFacilitiesFacilityIdEmployeeDistancesGet($facility_id);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling EmployeeFacilityDistancesApi->apiFacilitiesFacilityIdEmployeeDistancesGet: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **facility_id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse[]**](../Model/EmployeeFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiFacilitiesFacilityIdEmployeeDistancesIdDelete()`
|
||||
|
||||
```php
|
||||
apiFacilitiesFacilityIdEmployeeDistancesIdDelete($facility_id, $id)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\EmployeeFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$facility_id = 'facility_id_example'; // string
|
||||
$id = 'id_example'; // string
|
||||
|
||||
try {
|
||||
$apiInstance->apiFacilitiesFacilityIdEmployeeDistancesIdDelete($facility_id, $id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling EmployeeFacilityDistancesApi->apiFacilitiesFacilityIdEmployeeDistancesIdDelete: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **facility_id** | **string**| | |
|
||||
| **id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiFacilitiesFacilityIdEmployeeDistancesIdPut()`
|
||||
|
||||
```php
|
||||
apiFacilitiesFacilityIdEmployeeDistancesIdPut($facility_id, $id, $update_employee_facility_distance_request): \OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\EmployeeFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$facility_id = 'facility_id_example'; // string
|
||||
$id = 'id_example'; // string
|
||||
$update_employee_facility_distance_request = new \OmsorgCoreClient\Model\UpdateEmployeeFacilityDistanceRequest(); // \OmsorgCoreClient\Model\UpdateEmployeeFacilityDistanceRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiFacilitiesFacilityIdEmployeeDistancesIdPut($facility_id, $id, $update_employee_facility_distance_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling EmployeeFacilityDistancesApi->apiFacilitiesFacilityIdEmployeeDistancesIdPut: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **facility_id** | **string**| | |
|
||||
| **id** | **string**| | |
|
||||
| **update_employee_facility_distance_request** | [**\OmsorgCoreClient\Model\UpdateEmployeeFacilityDistanceRequest**](../Model/UpdateEmployeeFacilityDistanceRequest.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse**](../Model/EmployeeFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiFacilitiesFacilityIdEmployeeDistancesPost()`
|
||||
|
||||
```php
|
||||
apiFacilitiesFacilityIdEmployeeDistancesPost($facility_id, $create_employee_facility_distance_request): \OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\EmployeeFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$facility_id = 'facility_id_example'; // string
|
||||
$create_employee_facility_distance_request = new \OmsorgCoreClient\Model\CreateEmployeeFacilityDistanceRequest(); // \OmsorgCoreClient\Model\CreateEmployeeFacilityDistanceRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiFacilitiesFacilityIdEmployeeDistancesPost($facility_id, $create_employee_facility_distance_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling EmployeeFacilityDistancesApi->apiFacilitiesFacilityIdEmployeeDistancesPost: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **facility_id** | **string**| | |
|
||||
| **create_employee_facility_distance_request** | [**\OmsorgCoreClient\Model\CreateEmployeeFacilityDistanceRequest**](../Model/CreateEmployeeFacilityDistanceRequest.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\EmployeeFacilityDistanceResponse**](../Model/EmployeeFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
@@ -0,0 +1,239 @@
|
||||
# OmsorgCoreClient\MyFacilityDistancesApi
|
||||
|
||||
All URIs are relative to http://localhost, except if the operation defines another base path.
|
||||
|
||||
| Method | HTTP request | Description |
|
||||
| ------------- | ------------- | ------------- |
|
||||
| [**apiMeFacilityDistancesFacilitiesGet()**](MyFacilityDistancesApi.md#apiMeFacilityDistancesFacilitiesGet) | **GET** /api/me/facility-distances/facilities | |
|
||||
| [**apiMeFacilityDistancesGet()**](MyFacilityDistancesApi.md#apiMeFacilityDistancesGet) | **GET** /api/me/facility-distances | |
|
||||
| [**apiMeFacilityDistancesIdPut()**](MyFacilityDistancesApi.md#apiMeFacilityDistancesIdPut) | **PUT** /api/me/facility-distances/{id} | |
|
||||
| [**apiMeFacilityDistancesPost()**](MyFacilityDistancesApi.md#apiMeFacilityDistancesPost) | **POST** /api/me/facility-distances | |
|
||||
|
||||
|
||||
## `apiMeFacilityDistancesFacilitiesGet()`
|
||||
|
||||
```php
|
||||
apiMeFacilityDistancesFacilitiesGet(): \OmsorgCoreClient\Model\FacilityOptionResponse[]
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\MyFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiMeFacilityDistancesFacilitiesGet();
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling MyFacilityDistancesApi->apiMeFacilityDistancesFacilitiesGet: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\FacilityOptionResponse[]**](../Model/FacilityOptionResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiMeFacilityDistancesGet()`
|
||||
|
||||
```php
|
||||
apiMeFacilityDistancesGet(): \OmsorgCoreClient\Model\MyFacilityDistanceResponse[]
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\MyFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiMeFacilityDistancesGet();
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling MyFacilityDistancesApi->apiMeFacilityDistancesGet: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
This endpoint does not need any parameter.
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\MyFacilityDistanceResponse[]**](../Model/MyFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiMeFacilityDistancesIdPut()`
|
||||
|
||||
```php
|
||||
apiMeFacilityDistancesIdPut($id, $update_my_facility_distance_request): \OmsorgCoreClient\Model\MyFacilityDistanceResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\MyFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$id = 'id_example'; // string
|
||||
$update_my_facility_distance_request = new \OmsorgCoreClient\Model\UpdateMyFacilityDistanceRequest(); // \OmsorgCoreClient\Model\UpdateMyFacilityDistanceRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiMeFacilityDistancesIdPut($id, $update_my_facility_distance_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling MyFacilityDistancesApi->apiMeFacilityDistancesIdPut: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **id** | **string**| | |
|
||||
| **update_my_facility_distance_request** | [**\OmsorgCoreClient\Model\UpdateMyFacilityDistanceRequest**](../Model/UpdateMyFacilityDistanceRequest.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\MyFacilityDistanceResponse**](../Model/MyFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiMeFacilityDistancesPost()`
|
||||
|
||||
```php
|
||||
apiMeFacilityDistancesPost($create_my_facility_distance_request): \OmsorgCoreClient\Model\MyFacilityDistanceResponse
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\MyFacilityDistancesApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$create_my_facility_distance_request = new \OmsorgCoreClient\Model\CreateMyFacilityDistanceRequest(); // \OmsorgCoreClient\Model\CreateMyFacilityDistanceRequest
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiMeFacilityDistancesPost($create_my_facility_distance_request);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling MyFacilityDistancesApi->apiMeFacilityDistancesPost: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **create_my_facility_distance_request** | [**\OmsorgCoreClient\Model\CreateMyFacilityDistanceRequest**](../Model/CreateMyFacilityDistanceRequest.md)| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\MyFacilityDistanceResponse**](../Model/MyFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: `application/json`, `text/json`, `application/*+json`
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
@@ -8,6 +8,8 @@ All URIs are relative to http://localhost, except if the operation defines anoth
|
||||
| [**apiTrashAbsencesIdRestorePost()**](TrashApi.md#apiTrashAbsencesIdRestorePost) | **POST** /api/trash/absences/{id}/restore | |
|
||||
| [**apiTrashContractsGet()**](TrashApi.md#apiTrashContractsGet) | **GET** /api/trash/contracts | |
|
||||
| [**apiTrashContractsIdRestorePost()**](TrashApi.md#apiTrashContractsIdRestorePost) | **POST** /api/trash/contracts/{id}/restore | |
|
||||
| [**apiTrashEmployeeFacilityDistancesGet()**](TrashApi.md#apiTrashEmployeeFacilityDistancesGet) | **GET** /api/trash/employee-facility-distances | |
|
||||
| [**apiTrashEmployeeFacilityDistancesIdRestorePost()**](TrashApi.md#apiTrashEmployeeFacilityDistancesIdRestorePost) | **POST** /api/trash/employee-facility-distances/{id}/restore | |
|
||||
| [**apiTrashEmployeesGet()**](TrashApi.md#apiTrashEmployeesGet) | **GET** /api/trash/employees | |
|
||||
| [**apiTrashEmployeesIdRestorePost()**](TrashApi.md#apiTrashEmployeesIdRestorePost) | **POST** /api/trash/employees/{id}/restore | |
|
||||
| [**apiTrashFacilitiesGet()**](TrashApi.md#apiTrashFacilitiesGet) | **GET** /api/trash/facilities | |
|
||||
@@ -252,6 +254,121 @@ void (empty response body)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiTrashEmployeeFacilityDistancesGet()`
|
||||
|
||||
```php
|
||||
apiTrashEmployeeFacilityDistancesGet($search): \OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\TrashApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$search = 'search_example'; // string
|
||||
|
||||
try {
|
||||
$result = $apiInstance->apiTrashEmployeeFacilityDistancesGet($search);
|
||||
print_r($result);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling TrashApi->apiTrashEmployeeFacilityDistancesGet: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **search** | **string**| | [optional] |
|
||||
|
||||
### Return type
|
||||
|
||||
[**\OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]**](../Model/TrashEmployeeFacilityDistanceResponse.md)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: `text/plain`, `application/json`, `text/json`
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiTrashEmployeeFacilityDistancesIdRestorePost()`
|
||||
|
||||
```php
|
||||
apiTrashEmployeeFacilityDistancesIdRestorePost($id)
|
||||
```
|
||||
|
||||
|
||||
|
||||
### Example
|
||||
|
||||
```php
|
||||
<?php
|
||||
require_once(__DIR__ . '/vendor/autoload.php');
|
||||
|
||||
|
||||
// Configure Bearer (JWT) authorization: Bearer
|
||||
$config = OmsorgCoreClient\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
|
||||
|
||||
|
||||
$apiInstance = new OmsorgCoreClient\Api\TrashApi(
|
||||
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
|
||||
// This is optional, `GuzzleHttp\Client` will be used as default.
|
||||
new GuzzleHttp\Client(),
|
||||
$config
|
||||
);
|
||||
$id = 'id_example'; // string
|
||||
|
||||
try {
|
||||
$apiInstance->apiTrashEmployeeFacilityDistancesIdRestorePost($id);
|
||||
} catch (Exception $e) {
|
||||
echo 'Exception when calling TrashApi->apiTrashEmployeeFacilityDistancesIdRestorePost: ', $e->getMessage(), PHP_EOL;
|
||||
}
|
||||
```
|
||||
|
||||
### Parameters
|
||||
|
||||
| Name | Type | Description | Notes |
|
||||
| ------------- | ------------- | ------------- | ------------- |
|
||||
| **id** | **string**| | |
|
||||
|
||||
### Return type
|
||||
|
||||
void (empty response body)
|
||||
|
||||
### Authorization
|
||||
|
||||
[Bearer](../../README.md#Bearer)
|
||||
|
||||
### HTTP request headers
|
||||
|
||||
- **Content-Type**: Not defined
|
||||
- **Accept**: Not defined
|
||||
|
||||
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
|
||||
[[Back to Model list]](../../README.md#models)
|
||||
[[Back to README]](../../README.md)
|
||||
|
||||
## `apiTrashEmployeesGet()`
|
||||
|
||||
```php
|
||||
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# # CreateEmployeeFacilityDistanceRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**employee_id** | **string** | | [optional]
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
# # CreateMyFacilityDistanceRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**facility_id** | **string** | | [optional]
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# # EmployeeFacilityDistanceResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [optional]
|
||||
**facility_id** | **string** | | [optional]
|
||||
**employee_id** | **string** | | [optional]
|
||||
**employee_first_name** | **string** | | [optional]
|
||||
**employee_last_name** | **string** | | [optional]
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -0,0 +1,10 @@
|
||||
# # FacilityOptionResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [optional]
|
||||
**name** | **string** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -24,6 +24,8 @@ Name | Type | Description | Notes
|
||||
**sunday_surcharge_percent** | **float** | | [optional]
|
||||
**holiday_surcharge_percent** | **float** | | [optional]
|
||||
**travel_cost_rate** | **float** | | [optional]
|
||||
**travel_cost_mode** | **string** | | [optional]
|
||||
**travel_cost_per_km** | **float** | | [optional]
|
||||
**minimum_hours** | **float** | | [optional]
|
||||
**break_policy** | **string** | | [optional]
|
||||
**billing_interval** | **string** | | [optional]
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
# # MyFacilityDistanceResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [optional]
|
||||
**facility_id** | **string** | | [optional]
|
||||
**facility_name** | **string** | | [optional]
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
# # TrashEmployeeFacilityDistanceResponse
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**id** | **string** | | [optional]
|
||||
**facility_id** | **string** | | [optional]
|
||||
**employee_id** | **string** | | [optional]
|
||||
**distance_km** | **float** | | [optional]
|
||||
**deleted_at** | **\DateTime** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
# # UpdateEmployeeFacilityDistanceRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
@@ -23,6 +23,8 @@ Name | Type | Description | Notes
|
||||
**sunday_surcharge_percent** | **float** | | [optional]
|
||||
**holiday_surcharge_percent** | **float** | | [optional]
|
||||
**travel_cost_rate** | **float** | | [optional]
|
||||
**travel_cost_mode** | **string** | | [optional]
|
||||
**travel_cost_per_km** | **float** | | [optional]
|
||||
**minimum_hours** | **float** | | [optional]
|
||||
**break_policy** | **string** | | [optional]
|
||||
**billing_interval** | **string** | | [optional]
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# # UpdateMyFacilityDistanceRequest
|
||||
|
||||
## Properties
|
||||
|
||||
Name | Type | Description | Notes
|
||||
------------ | ------------- | ------------- | -------------
|
||||
**distance_km** | **float** | | [optional]
|
||||
|
||||
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -86,6 +86,12 @@ class TrashApi
|
||||
'apiTrashContractsIdRestorePost' => [
|
||||
'application/json',
|
||||
],
|
||||
'apiTrashEmployeeFacilityDistancesGet' => [
|
||||
'application/json',
|
||||
],
|
||||
'apiTrashEmployeeFacilityDistancesIdRestorePost' => [
|
||||
'application/json',
|
||||
],
|
||||
'apiTrashEmployeesGet' => [
|
||||
'application/json',
|
||||
],
|
||||
@@ -1049,6 +1055,479 @@ class TrashApi
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
if ($id !== null) {
|
||||
$resourcePath = str_replace(
|
||||
'{' . 'id' . '}',
|
||||
ObjectSerializer::toPathValue($id),
|
||||
$resourcePath
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$headers = $this->headerSelector->selectHeaders(
|
||||
[],
|
||||
$contentType,
|
||||
$multipart
|
||||
);
|
||||
|
||||
// for model (json/xml)
|
||||
if (count($formParams) > 0) {
|
||||
if ($multipart) {
|
||||
$multipartContents = [];
|
||||
foreach ($formParams as $formParamName => $formParamValue) {
|
||||
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
|
||||
foreach ($formParamValueItems as $formParamValueItem) {
|
||||
$multipartContents[] = [
|
||||
'name' => $formParamName,
|
||||
'contents' => $formParamValueItem
|
||||
];
|
||||
}
|
||||
}
|
||||
// for HTTP post (form)
|
||||
$httpBody = new MultipartStream($multipartContents);
|
||||
|
||||
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
|
||||
# if Content-Type contains "application/json", json_encode the form parameters
|
||||
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
|
||||
} else {
|
||||
// for HTTP post (form)
|
||||
$httpBody = ObjectSerializer::buildQuery($formParams);
|
||||
}
|
||||
}
|
||||
|
||||
// this endpoint requires Bearer (JWT) authentication (access token)
|
||||
if (!empty($this->config->getAccessToken())) {
|
||||
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
|
||||
}
|
||||
|
||||
$defaultHeaders = [];
|
||||
if ($this->config->getUserAgent()) {
|
||||
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
|
||||
}
|
||||
|
||||
$headers = array_merge(
|
||||
$defaultHeaders,
|
||||
$headerParams,
|
||||
$headers
|
||||
);
|
||||
|
||||
$operationHost = $this->config->getHost();
|
||||
$query = ObjectSerializer::buildQuery($queryParams);
|
||||
return new Request(
|
||||
'POST',
|
||||
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesGet
|
||||
*
|
||||
* @param string|null $search search (optional)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesGet'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesGet($search = null, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesGet'][0])
|
||||
{
|
||||
list($response) = $this->apiTrashEmployeeFacilityDistancesGetWithHttpInfo($search, $contentType);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesGetWithHttpInfo
|
||||
*
|
||||
* @param string|null $search (optional)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesGet'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of \OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[], HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesGetWithHttpInfo($search = null, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesGet'][0])
|
||||
{
|
||||
$request = $this->apiTrashEmployeeFacilityDistancesGetRequest($search, $contentType);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
try {
|
||||
$response = $this->client->send($request, $options);
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
} catch (ConnectException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
|
||||
|
||||
switch($statusCode) {
|
||||
case 200:
|
||||
return $this->handleResponseWithDataType(
|
||||
'\OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]',
|
||||
$request,
|
||||
$response,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($statusCode < 200 || $statusCode > 299) {
|
||||
throw new ApiException(
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
(string) $request->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
|
||||
return $this->handleResponseWithDataType(
|
||||
'\OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]',
|
||||
$request,
|
||||
$response,
|
||||
);
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
case 200:
|
||||
$data = ObjectSerializer::deserialize(
|
||||
$e->getResponseBody(),
|
||||
'\OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]',
|
||||
$e->getResponseHeaders()
|
||||
);
|
||||
$e->setResponseObject($data);
|
||||
throw $e;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesGetAsync
|
||||
*
|
||||
* @param string|null $search (optional)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesGet'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesGetAsync($search = null, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesGet'][0])
|
||||
{
|
||||
return $this->apiTrashEmployeeFacilityDistancesGetAsyncWithHttpInfo($search, $contentType)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesGetAsyncWithHttpInfo
|
||||
*
|
||||
* @param string|null $search (optional)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesGet'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesGetAsyncWithHttpInfo($search = null, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesGet'][0])
|
||||
{
|
||||
$returnType = '\OmsorgCoreClient\Model\TrashEmployeeFacilityDistanceResponse[]';
|
||||
$request = $this->apiTrashEmployeeFacilityDistancesGetRequest($search, $contentType);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
if ($returnType === '\SplFileObject') {
|
||||
$content = $response->getBody(); //stream goes to serializer
|
||||
} else {
|
||||
$content = (string) $response->getBody();
|
||||
if ($returnType !== 'string') {
|
||||
$content = json_decode($content);
|
||||
}
|
||||
}
|
||||
|
||||
return [
|
||||
ObjectSerializer::deserialize($content, $returnType, []),
|
||||
$response->getStatusCode(),
|
||||
$response->getHeaders()
|
||||
];
|
||||
},
|
||||
function ($exception) {
|
||||
$response = $exception->getResponse();
|
||||
$statusCode = $response->getStatusCode();
|
||||
throw new ApiException(
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$exception->getRequest()->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create request for operation 'apiTrashEmployeeFacilityDistancesGet'
|
||||
*
|
||||
* @param string|null $search (optional)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesGet'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesGetRequest($search = null, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesGet'][0])
|
||||
{
|
||||
|
||||
|
||||
|
||||
$resourcePath = '/api/trash/employee-facility-distances';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
// query params
|
||||
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
|
||||
$search,
|
||||
'search', // param base name
|
||||
'string', // openApiType
|
||||
'form', // style
|
||||
true, // explode
|
||||
false // required
|
||||
) ?? []);
|
||||
|
||||
|
||||
|
||||
|
||||
$headers = $this->headerSelector->selectHeaders(
|
||||
['text/plain', 'application/json', 'text/json', ],
|
||||
$contentType,
|
||||
$multipart
|
||||
);
|
||||
|
||||
// for model (json/xml)
|
||||
if (count($formParams) > 0) {
|
||||
if ($multipart) {
|
||||
$multipartContents = [];
|
||||
foreach ($formParams as $formParamName => $formParamValue) {
|
||||
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
|
||||
foreach ($formParamValueItems as $formParamValueItem) {
|
||||
$multipartContents[] = [
|
||||
'name' => $formParamName,
|
||||
'contents' => $formParamValueItem
|
||||
];
|
||||
}
|
||||
}
|
||||
// for HTTP post (form)
|
||||
$httpBody = new MultipartStream($multipartContents);
|
||||
|
||||
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
|
||||
# if Content-Type contains "application/json", json_encode the form parameters
|
||||
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
|
||||
} else {
|
||||
// for HTTP post (form)
|
||||
$httpBody = ObjectSerializer::buildQuery($formParams);
|
||||
}
|
||||
}
|
||||
|
||||
// this endpoint requires Bearer (JWT) authentication (access token)
|
||||
if (!empty($this->config->getAccessToken())) {
|
||||
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
|
||||
}
|
||||
|
||||
$defaultHeaders = [];
|
||||
if ($this->config->getUserAgent()) {
|
||||
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
|
||||
}
|
||||
|
||||
$headers = array_merge(
|
||||
$defaultHeaders,
|
||||
$headerParams,
|
||||
$headers
|
||||
);
|
||||
|
||||
$operationHost = $this->config->getHost();
|
||||
$query = ObjectSerializer::buildQuery($queryParams);
|
||||
return new Request(
|
||||
'GET',
|
||||
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesIdRestorePost
|
||||
*
|
||||
* @param string $id id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return void
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesIdRestorePost($id, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'][0])
|
||||
{
|
||||
$this->apiTrashEmployeeFacilityDistancesIdRestorePostWithHttpInfo($id, $contentType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesIdRestorePostWithHttpInfo
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesIdRestorePostWithHttpInfo($id, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'][0])
|
||||
{
|
||||
$request = $this->apiTrashEmployeeFacilityDistancesIdRestorePostRequest($id, $contentType);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
try {
|
||||
$response = $this->client->send($request, $options);
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
} catch (ConnectException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
|
||||
|
||||
return [null, $statusCode, $response->getHeaders()];
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesIdRestorePostAsync
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesIdRestorePostAsync($id, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'][0])
|
||||
{
|
||||
return $this->apiTrashEmployeeFacilityDistancesIdRestorePostAsyncWithHttpInfo($id, $contentType)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiTrashEmployeeFacilityDistancesIdRestorePostAsyncWithHttpInfo
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesIdRestorePostAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'][0])
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->apiTrashEmployeeFacilityDistancesIdRestorePostRequest($id, $contentType);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
return [null, $response->getStatusCode(), $response->getHeaders()];
|
||||
},
|
||||
function ($exception) {
|
||||
$response = $exception->getResponse();
|
||||
$statusCode = $response->getStatusCode();
|
||||
throw new ApiException(
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$exception->getRequest()->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create request for operation 'apiTrashEmployeeFacilityDistancesIdRestorePost'
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
public function apiTrashEmployeeFacilityDistancesIdRestorePostRequest($id, string $contentType = self::contentTypes['apiTrashEmployeeFacilityDistancesIdRestorePost'][0])
|
||||
{
|
||||
|
||||
// verify the required parameter 'id' is set
|
||||
if ($id === null || (is_array($id) && count($id) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $id when calling apiTrashEmployeeFacilityDistancesIdRestorePost'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$resourcePath = '/api/trash/employee-facility-distances/{id}/restore';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
if ($id !== null) {
|
||||
$resourcePath = str_replace(
|
||||
|
||||
+443
@@ -0,0 +1,443 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateEmployeeFacilityDistanceRequest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CreateEmployeeFacilityDistanceRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class CreateEmployeeFacilityDistanceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CreateEmployeeFacilityDistanceRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'employee_id' => 'string',
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'employee_id' => 'uuid',
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'employee_id' => false,
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'employee_id' => 'employeeId',
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'employee_id' => 'setEmployeeId',
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'employee_id' => 'getEmployeeId',
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('employee_id', $data ?? [], null);
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets employee_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmployeeId()
|
||||
{
|
||||
return $this->container['employee_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets employee_id
|
||||
*
|
||||
* @param string|null $employee_id employee_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEmployeeId($employee_id)
|
||||
{
|
||||
if (is_null($employee_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
|
||||
}
|
||||
$this->container['employee_id'] = $employee_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+443
@@ -0,0 +1,443 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateMyFacilityDistanceRequest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* CreateMyFacilityDistanceRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class CreateMyFacilityDistanceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'CreateMyFacilityDistanceRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'facility_id' => 'string',
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'facility_id' => 'uuid',
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'facility_id' => false,
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'facility_id' => 'facilityId',
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'facility_id' => 'setFacilityId',
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'facility_id' => 'getFacilityId',
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('facility_id', $data ?? [], null);
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets facility_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFacilityId()
|
||||
{
|
||||
return $this->container['facility_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets facility_id
|
||||
*
|
||||
* @param string|null $facility_id facility_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFacilityId($facility_id)
|
||||
{
|
||||
if (is_null($facility_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
|
||||
}
|
||||
$this->container['facility_id'] = $facility_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+593
@@ -0,0 +1,593 @@
|
||||
<?php
|
||||
/**
|
||||
* EmployeeFacilityDistanceResponse
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* EmployeeFacilityDistanceResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class EmployeeFacilityDistanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'EmployeeFacilityDistanceResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'facility_id' => 'string',
|
||||
'employee_id' => 'string',
|
||||
'employee_first_name' => 'string',
|
||||
'employee_last_name' => 'string',
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => 'uuid',
|
||||
'facility_id' => 'uuid',
|
||||
'employee_id' => 'uuid',
|
||||
'employee_first_name' => null,
|
||||
'employee_last_name' => null,
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
'facility_id' => false,
|
||||
'employee_id' => false,
|
||||
'employee_first_name' => true,
|
||||
'employee_last_name' => true,
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'facility_id' => 'facilityId',
|
||||
'employee_id' => 'employeeId',
|
||||
'employee_first_name' => 'employeeFirstName',
|
||||
'employee_last_name' => 'employeeLastName',
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'facility_id' => 'setFacilityId',
|
||||
'employee_id' => 'setEmployeeId',
|
||||
'employee_first_name' => 'setEmployeeFirstName',
|
||||
'employee_last_name' => 'setEmployeeLastName',
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'facility_id' => 'getFacilityId',
|
||||
'employee_id' => 'getEmployeeId',
|
||||
'employee_first_name' => 'getEmployeeFirstName',
|
||||
'employee_last_name' => 'getEmployeeLastName',
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('id', $data ?? [], null);
|
||||
$this->setIfExists('facility_id', $data ?? [], null);
|
||||
$this->setIfExists('employee_id', $data ?? [], null);
|
||||
$this->setIfExists('employee_first_name', $data ?? [], null);
|
||||
$this->setIfExists('employee_last_name', $data ?? [], null);
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets facility_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFacilityId()
|
||||
{
|
||||
return $this->container['facility_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets facility_id
|
||||
*
|
||||
* @param string|null $facility_id facility_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFacilityId($facility_id)
|
||||
{
|
||||
if (is_null($facility_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
|
||||
}
|
||||
$this->container['facility_id'] = $facility_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets employee_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmployeeId()
|
||||
{
|
||||
return $this->container['employee_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets employee_id
|
||||
*
|
||||
* @param string|null $employee_id employee_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEmployeeId($employee_id)
|
||||
{
|
||||
if (is_null($employee_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
|
||||
}
|
||||
$this->container['employee_id'] = $employee_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets employee_first_name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmployeeFirstName()
|
||||
{
|
||||
return $this->container['employee_first_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets employee_first_name
|
||||
*
|
||||
* @param string|null $employee_first_name employee_first_name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEmployeeFirstName($employee_first_name)
|
||||
{
|
||||
if (is_null($employee_first_name)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'employee_first_name');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('employee_first_name', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['employee_first_name'] = $employee_first_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets employee_last_name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmployeeLastName()
|
||||
{
|
||||
return $this->container['employee_last_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets employee_last_name
|
||||
*
|
||||
* @param string|null $employee_last_name employee_last_name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEmployeeLastName($employee_last_name)
|
||||
{
|
||||
if (is_null($employee_last_name)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'employee_last_name');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('employee_last_name', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['employee_last_name'] = $employee_last_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,450 @@
|
||||
<?php
|
||||
/**
|
||||
* FacilityOptionResponse
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* FacilityOptionResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class FacilityOptionResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'FacilityOptionResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'name' => 'string'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => 'uuid',
|
||||
'name' => null
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
'name' => true
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'name' => 'name'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'name' => 'setName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'name' => 'getName'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('id', $data ?? [], null);
|
||||
$this->setIfExists('name', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->container['name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets name
|
||||
*
|
||||
* @param string|null $name name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setName($name)
|
||||
{
|
||||
if (is_null($name)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'name');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('name', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['name'] = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => 'float',
|
||||
'holiday_surcharge_percent' => 'float',
|
||||
'travel_cost_rate' => 'float',
|
||||
'travel_cost_mode' => 'string',
|
||||
'travel_cost_per_km' => 'float',
|
||||
'minimum_hours' => 'float',
|
||||
'break_policy' => 'string',
|
||||
'billing_interval' => 'string',
|
||||
@@ -112,6 +114,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => 'double',
|
||||
'holiday_surcharge_percent' => 'double',
|
||||
'travel_cost_rate' => 'double',
|
||||
'travel_cost_mode' => null,
|
||||
'travel_cost_per_km' => 'double',
|
||||
'minimum_hours' => 'double',
|
||||
'break_policy' => null,
|
||||
'billing_interval' => null,
|
||||
@@ -145,6 +149,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => true,
|
||||
'holiday_surcharge_percent' => true,
|
||||
'travel_cost_rate' => true,
|
||||
'travel_cost_mode' => true,
|
||||
'travel_cost_per_km' => true,
|
||||
'minimum_hours' => true,
|
||||
'break_policy' => true,
|
||||
'billing_interval' => true,
|
||||
@@ -258,6 +264,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => 'sundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'holidaySurchargePercent',
|
||||
'travel_cost_rate' => 'travelCostRate',
|
||||
'travel_cost_mode' => 'travelCostMode',
|
||||
'travel_cost_per_km' => 'travelCostPerKm',
|
||||
'minimum_hours' => 'minimumHours',
|
||||
'break_policy' => 'breakPolicy',
|
||||
'billing_interval' => 'billingInterval',
|
||||
@@ -291,6 +299,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => 'setSundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
|
||||
'travel_cost_rate' => 'setTravelCostRate',
|
||||
'travel_cost_mode' => 'setTravelCostMode',
|
||||
'travel_cost_per_km' => 'setTravelCostPerKm',
|
||||
'minimum_hours' => 'setMinimumHours',
|
||||
'break_policy' => 'setBreakPolicy',
|
||||
'billing_interval' => 'setBillingInterval',
|
||||
@@ -324,6 +334,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
'sunday_surcharge_percent' => 'getSundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
|
||||
'travel_cost_rate' => 'getTravelCostRate',
|
||||
'travel_cost_mode' => 'getTravelCostMode',
|
||||
'travel_cost_per_km' => 'getTravelCostPerKm',
|
||||
'minimum_hours' => 'getMinimumHours',
|
||||
'break_policy' => 'getBreakPolicy',
|
||||
'billing_interval' => 'getBillingInterval',
|
||||
@@ -408,6 +420,8 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
$this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
|
||||
$this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_rate', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_mode', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_per_km', $data ?? [], null);
|
||||
$this->setIfExists('minimum_hours', $data ?? [], null);
|
||||
$this->setIfExists('break_policy', $data ?? [], null);
|
||||
$this->setIfExists('billing_interval', $data ?? [], null);
|
||||
@@ -1130,6 +1144,74 @@ class FacilityResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets travel_cost_mode
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTravelCostMode()
|
||||
{
|
||||
return $this->container['travel_cost_mode'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets travel_cost_mode
|
||||
*
|
||||
* @param string|null $travel_cost_mode travel_cost_mode
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTravelCostMode($travel_cost_mode)
|
||||
{
|
||||
if (is_null($travel_cost_mode)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'travel_cost_mode');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('travel_cost_mode', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['travel_cost_mode'] = $travel_cost_mode;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets travel_cost_per_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getTravelCostPerKm()
|
||||
{
|
||||
return $this->container['travel_cost_per_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets travel_cost_per_km
|
||||
*
|
||||
* @param float|null $travel_cost_per_km travel_cost_per_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTravelCostPerKm($travel_cost_per_km)
|
||||
{
|
||||
if (is_null($travel_cost_per_km)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'travel_cost_per_km');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('travel_cost_per_km', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['travel_cost_per_km'] = $travel_cost_per_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets minimum_hours
|
||||
*
|
||||
|
||||
@@ -70,6 +70,8 @@ class ModuleType
|
||||
|
||||
public const ABSENCES = 'Absences';
|
||||
|
||||
public const EMPLOYEE_FACILITY_DISTANCES = 'EmployeeFacilityDistances';
|
||||
|
||||
/**
|
||||
* Gets allowable values of the enum
|
||||
* @return string[]
|
||||
@@ -90,7 +92,8 @@ class ModuleType
|
||||
self::DOCUMENTS,
|
||||
self::USERS,
|
||||
self::CONFIGURATION,
|
||||
self::ABSENCES
|
||||
self::ABSENCES,
|
||||
self::EMPLOYEE_FACILITY_DISTANCES
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,518 @@
|
||||
<?php
|
||||
/**
|
||||
* MyFacilityDistanceResponse
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* MyFacilityDistanceResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class MyFacilityDistanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'MyFacilityDistanceResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'facility_id' => 'string',
|
||||
'facility_name' => 'string',
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => 'uuid',
|
||||
'facility_id' => 'uuid',
|
||||
'facility_name' => null,
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
'facility_id' => false,
|
||||
'facility_name' => true,
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'facility_id' => 'facilityId',
|
||||
'facility_name' => 'facilityName',
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'facility_id' => 'setFacilityId',
|
||||
'facility_name' => 'setFacilityName',
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'facility_id' => 'getFacilityId',
|
||||
'facility_name' => 'getFacilityName',
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('id', $data ?? [], null);
|
||||
$this->setIfExists('facility_id', $data ?? [], null);
|
||||
$this->setIfExists('facility_name', $data ?? [], null);
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets facility_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFacilityId()
|
||||
{
|
||||
return $this->container['facility_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets facility_id
|
||||
*
|
||||
* @param string|null $facility_id facility_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFacilityId($facility_id)
|
||||
{
|
||||
if (is_null($facility_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
|
||||
}
|
||||
$this->container['facility_id'] = $facility_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets facility_name
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFacilityName()
|
||||
{
|
||||
return $this->container['facility_name'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets facility_name
|
||||
*
|
||||
* @param string|null $facility_name facility_name
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFacilityName($facility_name)
|
||||
{
|
||||
if (is_null($facility_name)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'facility_name');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('facility_name', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['facility_name'] = $facility_name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+552
@@ -0,0 +1,552 @@
|
||||
<?php
|
||||
/**
|
||||
* TrashEmployeeFacilityDistanceResponse
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* TrashEmployeeFacilityDistanceResponse Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class TrashEmployeeFacilityDistanceResponse implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'TrashEmployeeFacilityDistanceResponse';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'id' => 'string',
|
||||
'facility_id' => 'string',
|
||||
'employee_id' => 'string',
|
||||
'distance_km' => 'float',
|
||||
'deleted_at' => '\DateTime'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'id' => 'uuid',
|
||||
'facility_id' => 'uuid',
|
||||
'employee_id' => 'uuid',
|
||||
'distance_km' => 'double',
|
||||
'deleted_at' => 'date-time'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'id' => false,
|
||||
'facility_id' => false,
|
||||
'employee_id' => false,
|
||||
'distance_km' => false,
|
||||
'deleted_at' => true
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'id' => 'id',
|
||||
'facility_id' => 'facilityId',
|
||||
'employee_id' => 'employeeId',
|
||||
'distance_km' => 'distanceKm',
|
||||
'deleted_at' => 'deletedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'id' => 'setId',
|
||||
'facility_id' => 'setFacilityId',
|
||||
'employee_id' => 'setEmployeeId',
|
||||
'distance_km' => 'setDistanceKm',
|
||||
'deleted_at' => 'setDeletedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'id' => 'getId',
|
||||
'facility_id' => 'getFacilityId',
|
||||
'employee_id' => 'getEmployeeId',
|
||||
'distance_km' => 'getDistanceKm',
|
||||
'deleted_at' => 'getDeletedAt'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('id', $data ?? [], null);
|
||||
$this->setIfExists('facility_id', $data ?? [], null);
|
||||
$this->setIfExists('employee_id', $data ?? [], null);
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
$this->setIfExists('deleted_at', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getId()
|
||||
{
|
||||
return $this->container['id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets id
|
||||
*
|
||||
* @param string|null $id id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setId($id)
|
||||
{
|
||||
if (is_null($id)) {
|
||||
throw new \InvalidArgumentException('non-nullable id cannot be null');
|
||||
}
|
||||
$this->container['id'] = $id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets facility_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFacilityId()
|
||||
{
|
||||
return $this->container['facility_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets facility_id
|
||||
*
|
||||
* @param string|null $facility_id facility_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setFacilityId($facility_id)
|
||||
{
|
||||
if (is_null($facility_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable facility_id cannot be null');
|
||||
}
|
||||
$this->container['facility_id'] = $facility_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets employee_id
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getEmployeeId()
|
||||
{
|
||||
return $this->container['employee_id'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets employee_id
|
||||
*
|
||||
* @param string|null $employee_id employee_id
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setEmployeeId($employee_id)
|
||||
{
|
||||
if (is_null($employee_id)) {
|
||||
throw new \InvalidArgumentException('non-nullable employee_id cannot be null');
|
||||
}
|
||||
$this->container['employee_id'] = $employee_id;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets deleted_at
|
||||
*
|
||||
* @return \DateTime|null
|
||||
*/
|
||||
public function getDeletedAt()
|
||||
{
|
||||
return $this->container['deleted_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets deleted_at
|
||||
*
|
||||
* @param \DateTime|null $deleted_at deleted_at
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDeletedAt($deleted_at)
|
||||
{
|
||||
if (is_null($deleted_at)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'deleted_at');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('deleted_at', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['deleted_at'] = $deleted_at;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+409
@@ -0,0 +1,409 @@
|
||||
<?php
|
||||
/**
|
||||
* UpdateEmployeeFacilityDistanceRequest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* UpdateEmployeeFacilityDistanceRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class UpdateEmployeeFacilityDistanceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'UpdateEmployeeFacilityDistanceRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => 'float',
|
||||
'holiday_surcharge_percent' => 'float',
|
||||
'travel_cost_rate' => 'float',
|
||||
'travel_cost_mode' => 'string',
|
||||
'travel_cost_per_km' => 'float',
|
||||
'minimum_hours' => 'float',
|
||||
'break_policy' => 'string',
|
||||
'billing_interval' => 'string',
|
||||
@@ -110,6 +112,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => 'double',
|
||||
'holiday_surcharge_percent' => 'double',
|
||||
'travel_cost_rate' => 'double',
|
||||
'travel_cost_mode' => null,
|
||||
'travel_cost_per_km' => 'double',
|
||||
'minimum_hours' => 'double',
|
||||
'break_policy' => null,
|
||||
'billing_interval' => null,
|
||||
@@ -142,6 +146,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => true,
|
||||
'holiday_surcharge_percent' => true,
|
||||
'travel_cost_rate' => true,
|
||||
'travel_cost_mode' => true,
|
||||
'travel_cost_per_km' => true,
|
||||
'minimum_hours' => true,
|
||||
'break_policy' => true,
|
||||
'billing_interval' => true,
|
||||
@@ -254,6 +260,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => 'sundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'holidaySurchargePercent',
|
||||
'travel_cost_rate' => 'travelCostRate',
|
||||
'travel_cost_mode' => 'travelCostMode',
|
||||
'travel_cost_per_km' => 'travelCostPerKm',
|
||||
'minimum_hours' => 'minimumHours',
|
||||
'break_policy' => 'breakPolicy',
|
||||
'billing_interval' => 'billingInterval',
|
||||
@@ -286,6 +294,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => 'setSundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'setHolidaySurchargePercent',
|
||||
'travel_cost_rate' => 'setTravelCostRate',
|
||||
'travel_cost_mode' => 'setTravelCostMode',
|
||||
'travel_cost_per_km' => 'setTravelCostPerKm',
|
||||
'minimum_hours' => 'setMinimumHours',
|
||||
'break_policy' => 'setBreakPolicy',
|
||||
'billing_interval' => 'setBillingInterval',
|
||||
@@ -318,6 +328,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
'sunday_surcharge_percent' => 'getSundaySurchargePercent',
|
||||
'holiday_surcharge_percent' => 'getHolidaySurchargePercent',
|
||||
'travel_cost_rate' => 'getTravelCostRate',
|
||||
'travel_cost_mode' => 'getTravelCostMode',
|
||||
'travel_cost_per_km' => 'getTravelCostPerKm',
|
||||
'minimum_hours' => 'getMinimumHours',
|
||||
'break_policy' => 'getBreakPolicy',
|
||||
'billing_interval' => 'getBillingInterval',
|
||||
@@ -401,6 +413,8 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
$this->setIfExists('sunday_surcharge_percent', $data ?? [], null);
|
||||
$this->setIfExists('holiday_surcharge_percent', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_rate', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_mode', $data ?? [], null);
|
||||
$this->setIfExists('travel_cost_per_km', $data ?? [], null);
|
||||
$this->setIfExists('minimum_hours', $data ?? [], null);
|
||||
$this->setIfExists('break_policy', $data ?? [], null);
|
||||
$this->setIfExists('billing_interval', $data ?? [], null);
|
||||
@@ -1096,6 +1110,74 @@ class UpdateFacilityRequest implements ModelInterface, ArrayAccess, \JsonSeriali
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets travel_cost_mode
|
||||
*
|
||||
* @return string|null
|
||||
*/
|
||||
public function getTravelCostMode()
|
||||
{
|
||||
return $this->container['travel_cost_mode'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets travel_cost_mode
|
||||
*
|
||||
* @param string|null $travel_cost_mode travel_cost_mode
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTravelCostMode($travel_cost_mode)
|
||||
{
|
||||
if (is_null($travel_cost_mode)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'travel_cost_mode');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('travel_cost_mode', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['travel_cost_mode'] = $travel_cost_mode;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets travel_cost_per_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getTravelCostPerKm()
|
||||
{
|
||||
return $this->container['travel_cost_per_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets travel_cost_per_km
|
||||
*
|
||||
* @param float|null $travel_cost_per_km travel_cost_per_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setTravelCostPerKm($travel_cost_per_km)
|
||||
{
|
||||
if (is_null($travel_cost_per_km)) {
|
||||
array_push($this->openAPINullablesSetToNull, 'travel_cost_per_km');
|
||||
} else {
|
||||
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
|
||||
$index = array_search('travel_cost_per_km', $nullablesSetToNull);
|
||||
if ($index !== FALSE) {
|
||||
unset($nullablesSetToNull[$index]);
|
||||
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
|
||||
}
|
||||
}
|
||||
$this->container['travel_cost_per_km'] = $travel_cost_per_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets minimum_hours
|
||||
*
|
||||
|
||||
+409
@@ -0,0 +1,409 @@
|
||||
<?php
|
||||
/**
|
||||
* UpdateMyFacilityDistanceRequest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Model;
|
||||
|
||||
use \ArrayAccess;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
|
||||
/**
|
||||
* UpdateMyFacilityDistanceRequest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
* @implements \ArrayAccess<string, mixed>
|
||||
*/
|
||||
class UpdateMyFacilityDistanceRequest implements ModelInterface, ArrayAccess, \JsonSerializable
|
||||
{
|
||||
public const DISCRIMINATOR = null;
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $openAPIModelName = 'UpdateMyFacilityDistanceRequest';
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $openAPITypes = [
|
||||
'distance_km' => 'float'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @var string[]
|
||||
* @phpstan-var array<string, string|null>
|
||||
* @psalm-var array<string, string|null>
|
||||
*/
|
||||
protected static $openAPIFormats = [
|
||||
'distance_km' => 'double'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of nullable properties. Used for (de)serialization
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected static array $openAPINullables = [
|
||||
'distance_km' => false
|
||||
];
|
||||
|
||||
/**
|
||||
* If a nullable field gets set to null, insert it here
|
||||
*
|
||||
* @var boolean[]
|
||||
*/
|
||||
protected array $openAPINullablesSetToNull = [];
|
||||
|
||||
/**
|
||||
* Array of property to type mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPITypes()
|
||||
{
|
||||
return self::$openAPITypes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of property to format mappings. Used for (de)serialization
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function openAPIFormats()
|
||||
{
|
||||
return self::$openAPIFormats;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable properties
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected static function openAPINullables(): array
|
||||
{
|
||||
return self::$openAPINullables;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @return boolean[]
|
||||
*/
|
||||
private function getOpenAPINullablesSetToNull(): array
|
||||
{
|
||||
return $this->openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter - Array of nullable field names deliberately set to null
|
||||
*
|
||||
* @param boolean[] $openAPINullablesSetToNull
|
||||
*/
|
||||
private function setOpenAPINullablesSetToNull(array $openAPINullablesSetToNull): void
|
||||
{
|
||||
$this->openAPINullablesSetToNull = $openAPINullablesSetToNull;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a property is nullable
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public static function isNullable(string $property): bool
|
||||
{
|
||||
return self::openAPINullables()[$property] ?? false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a nullable property is set to null.
|
||||
*
|
||||
* @param string $property
|
||||
* @return bool
|
||||
*/
|
||||
public function isNullableSetToNull(string $property): bool
|
||||
{
|
||||
return in_array($property, $this->getOpenAPINullablesSetToNull(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $attributeMap = [
|
||||
'distance_km' => 'distanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $setters = [
|
||||
'distance_km' => 'setDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @var string[]
|
||||
*/
|
||||
protected static $getters = [
|
||||
'distance_km' => 'getDistanceKm'
|
||||
];
|
||||
|
||||
/**
|
||||
* Array of attributes where the key is the local name,
|
||||
* and the value is the original name
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function attributeMap()
|
||||
{
|
||||
return self::$attributeMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to setter functions (for deserialization of responses)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function setters()
|
||||
{
|
||||
return self::$setters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Array of attributes to getter functions (for serialization of requests)
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public static function getters()
|
||||
{
|
||||
return self::$getters;
|
||||
}
|
||||
|
||||
/**
|
||||
* The original name of the model.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getModelName()
|
||||
{
|
||||
return self::$openAPIModelName;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Associative array for storing property values
|
||||
*
|
||||
* @var mixed[]
|
||||
*/
|
||||
protected $container = [];
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param mixed[]|null $data Associated array of property values
|
||||
* initializing the model
|
||||
*/
|
||||
public function __construct(?array $data = null)
|
||||
{
|
||||
$this->setIfExists('distance_km', $data ?? [], null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName
|
||||
* is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the
|
||||
* $this->openAPINullablesSetToNull array
|
||||
*
|
||||
* @param string $variableName
|
||||
* @param array $fields
|
||||
* @param mixed $defaultValue
|
||||
*/
|
||||
private function setIfExists(string $variableName, array $fields, $defaultValue): void
|
||||
{
|
||||
if (self::isNullable($variableName) && array_key_exists($variableName, $fields) && is_null($fields[$variableName])) {
|
||||
$this->openAPINullablesSetToNull[] = $variableName;
|
||||
}
|
||||
|
||||
$this->container[$variableName] = $fields[$variableName] ?? $defaultValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* Show all the invalid properties with reasons.
|
||||
*
|
||||
* @return array invalid properties with reasons
|
||||
*/
|
||||
public function listInvalidProperties()
|
||||
{
|
||||
$invalidProperties = [];
|
||||
|
||||
return $invalidProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate all the properties in the model
|
||||
* return true if all passed
|
||||
*
|
||||
* @return bool True if all properties are valid
|
||||
*/
|
||||
public function valid()
|
||||
{
|
||||
return count($this->listInvalidProperties()) === 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets distance_km
|
||||
*
|
||||
* @return float|null
|
||||
*/
|
||||
public function getDistanceKm()
|
||||
{
|
||||
return $this->container['distance_km'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets distance_km
|
||||
*
|
||||
* @param float|null $distance_km distance_km
|
||||
*
|
||||
* @return self
|
||||
*/
|
||||
public function setDistanceKm($distance_km)
|
||||
{
|
||||
if (is_null($distance_km)) {
|
||||
throw new \InvalidArgumentException('non-nullable distance_km cannot be null');
|
||||
}
|
||||
$this->container['distance_km'] = $distance_km;
|
||||
|
||||
return $this;
|
||||
}
|
||||
/**
|
||||
* Returns true if offset exists. False otherwise.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public function offsetExists($offset): bool
|
||||
{
|
||||
return isset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return mixed|null
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function offsetGet($offset)
|
||||
{
|
||||
return $this->container[$offset] ?? null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets value based on offset.
|
||||
*
|
||||
* @param int|null $offset Offset
|
||||
* @param mixed $value Value to be set
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($offset, $value): void
|
||||
{
|
||||
if (is_null($offset)) {
|
||||
$this->container[] = $value;
|
||||
} else {
|
||||
$this->container[$offset] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Unsets offset.
|
||||
*
|
||||
* @param integer $offset Offset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($offset): void
|
||||
{
|
||||
unset($this->container[$offset]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Serializes the object to a value that can be serialized natively by json_encode().
|
||||
* @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php
|
||||
*
|
||||
* @return mixed Returns data which can be serialized by json_encode(), which is a value
|
||||
* of any type other than a resource.
|
||||
*/
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
{
|
||||
return ObjectSerializer::sanitizeForSerialization($this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function __toString()
|
||||
{
|
||||
return json_encode(
|
||||
ObjectSerializer::sanitizeForSerialization($this),
|
||||
JSON_PRETTY_PRINT
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a header-safe presentation of the object
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function toHeaderValue()
|
||||
{
|
||||
return json_encode(ObjectSerializer::sanitizeForSerialization($this));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* EmployeeFacilityDistancesApiTest
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Api;
|
||||
|
||||
use \OmsorgCoreClient\Configuration;
|
||||
use \OmsorgCoreClient\ApiException;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* EmployeeFacilityDistancesApiTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class EmployeeFacilityDistancesApiTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiFacilitiesFacilityIdEmployeeDistancesGet
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiFacilitiesFacilityIdEmployeeDistancesGet()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiFacilitiesFacilityIdEmployeeDistancesIdDelete
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiFacilitiesFacilityIdEmployeeDistancesIdDelete()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiFacilitiesFacilityIdEmployeeDistancesIdPut
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiFacilitiesFacilityIdEmployeeDistancesIdPut()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiFacilitiesFacilityIdEmployeeDistancesPost
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiFacilitiesFacilityIdEmployeeDistancesPost()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,121 @@
|
||||
<?php
|
||||
/**
|
||||
* MyFacilityDistancesApiTest
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the endpoint.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Api;
|
||||
|
||||
use \OmsorgCoreClient\Configuration;
|
||||
use \OmsorgCoreClient\ApiException;
|
||||
use \OmsorgCoreClient\ObjectSerializer;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* MyFacilityDistancesApiTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class MyFacilityDistancesApiTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test cases
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiMeFacilityDistancesFacilitiesGet
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiMeFacilityDistancesFacilitiesGet()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiMeFacilityDistancesGet
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiMeFacilityDistancesGet()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiMeFacilityDistancesIdPut
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiMeFacilityDistancesIdPut()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test case for apiMeFacilityDistancesPost
|
||||
*
|
||||
* .
|
||||
*
|
||||
*/
|
||||
public function testApiMeFacilityDistancesPost()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateEmployeeFacilityDistanceRequestTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* CreateEmployeeFacilityDistanceRequestTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description CreateEmployeeFacilityDistanceRequest
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CreateEmployeeFacilityDistanceRequestTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "CreateEmployeeFacilityDistanceRequest"
|
||||
*/
|
||||
public function testCreateEmployeeFacilityDistanceRequest()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "employee_id"
|
||||
*/
|
||||
public function testPropertyEmployeeId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* CreateMyFacilityDistanceRequestTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* CreateMyFacilityDistanceRequestTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description CreateMyFacilityDistanceRequest
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class CreateMyFacilityDistanceRequestTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "CreateMyFacilityDistanceRequest"
|
||||
*/
|
||||
public function testCreateMyFacilityDistanceRequest()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "facility_id"
|
||||
*/
|
||||
public function testPropertyFacilityId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
<?php
|
||||
/**
|
||||
* EmployeeFacilityDistanceResponseTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* EmployeeFacilityDistanceResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description EmployeeFacilityDistanceResponse
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class EmployeeFacilityDistanceResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "EmployeeFacilityDistanceResponse"
|
||||
*/
|
||||
public function testEmployeeFacilityDistanceResponse()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "facility_id"
|
||||
*/
|
||||
public function testPropertyFacilityId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "employee_id"
|
||||
*/
|
||||
public function testPropertyEmployeeId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "employee_first_name"
|
||||
*/
|
||||
public function testPropertyEmployeeFirstName()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "employee_last_name"
|
||||
*/
|
||||
public function testPropertyEmployeeLastName()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
/**
|
||||
* FacilityOptionResponseTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* FacilityOptionResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description FacilityOptionResponse
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class FacilityOptionResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "FacilityOptionResponse"
|
||||
*/
|
||||
public function testFacilityOptionResponse()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "name"
|
||||
*/
|
||||
public function testPropertyName()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+117
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
/**
|
||||
* MyFacilityDistanceResponseTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* MyFacilityDistanceResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description MyFacilityDistanceResponse
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class MyFacilityDistanceResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "MyFacilityDistanceResponse"
|
||||
*/
|
||||
public function testMyFacilityDistanceResponse()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "facility_id"
|
||||
*/
|
||||
public function testPropertyFacilityId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "facility_name"
|
||||
*/
|
||||
public function testPropertyFacilityName()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+126
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
/**
|
||||
* TrashEmployeeFacilityDistanceResponseTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* TrashEmployeeFacilityDistanceResponseTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description TrashEmployeeFacilityDistanceResponse
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class TrashEmployeeFacilityDistanceResponseTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "TrashEmployeeFacilityDistanceResponse"
|
||||
*/
|
||||
public function testTrashEmployeeFacilityDistanceResponse()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "id"
|
||||
*/
|
||||
public function testPropertyId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "facility_id"
|
||||
*/
|
||||
public function testPropertyFacilityId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "employee_id"
|
||||
*/
|
||||
public function testPropertyEmployeeId()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "deleted_at"
|
||||
*/
|
||||
public function testPropertyDeletedAt()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* UpdateEmployeeFacilityDistanceRequestTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* UpdateEmployeeFacilityDistanceRequestTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description UpdateEmployeeFacilityDistanceRequest
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class UpdateEmployeeFacilityDistanceRequestTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "UpdateEmployeeFacilityDistanceRequest"
|
||||
*/
|
||||
public function testUpdateEmployeeFacilityDistanceRequest()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
<?php
|
||||
/**
|
||||
* UpdateMyFacilityDistanceRequestTest
|
||||
*
|
||||
* PHP version 8.1
|
||||
*
|
||||
* @category Class
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
|
||||
/**
|
||||
* OmsorgCore.Api
|
||||
*
|
||||
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
||||
*
|
||||
* The version of the OpenAPI document: 1.0
|
||||
* Generated by: https://openapi-generator.tech
|
||||
* Generator version: 7.14.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Please update the test case below to test the model.
|
||||
*/
|
||||
|
||||
namespace OmsorgCoreClient\Test\Model;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* UpdateMyFacilityDistanceRequestTest Class Doc Comment
|
||||
*
|
||||
* @category Class
|
||||
* @description UpdateMyFacilityDistanceRequest
|
||||
* @package OmsorgCoreClient
|
||||
* @author OpenAPI Generator team
|
||||
* @link https://openapi-generator.tech
|
||||
*/
|
||||
class UpdateMyFacilityDistanceRequestTest extends TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* Setup before running any test case
|
||||
*/
|
||||
public static function setUpBeforeClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Setup before running each test case
|
||||
*/
|
||||
public function setUp(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running each test case
|
||||
*/
|
||||
public function tearDown(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Clean up after running all test cases
|
||||
*/
|
||||
public static function tearDownAfterClass(): void
|
||||
{
|
||||
}
|
||||
|
||||
/**
|
||||
* Test "UpdateMyFacilityDistanceRequest"
|
||||
*/
|
||||
public function testUpdateMyFacilityDistanceRequest()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
|
||||
/**
|
||||
* Test attribute "distance_km"
|
||||
*/
|
||||
public function testPropertyDistanceKm()
|
||||
{
|
||||
// TODO: implement
|
||||
self::markTestIncomplete('Not implemented');
|
||||
}
|
||||
}
|
||||
@@ -45,6 +45,11 @@ function layout_start(string $title, string $currentPage = 'dashboard'): void {
|
||||
<span class="nav-icon">⏱</span><span class="nav-label"> Zeiterfassung</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<?php if (has_permission('EmployeeFacilityDistances', 'View')): ?>
|
||||
<a href="fahrtstrecken.php" class="<?= $currentPage === 'fahrtstrecken' ? 'active' : '' ?>">
|
||||
<span class="nav-icon">🚗</span><span class="nav-label"> Fahrtstrecken</span>
|
||||
</a>
|
||||
<?php endif; ?>
|
||||
<a href="settings.php" class="<?= $currentPage === 'settings' ? 'active' : '' ?>">
|
||||
<span class="nav-icon">⚙</span><span class="nav-label"> Einstellungen</span>
|
||||
</a>
|
||||
|
||||
@@ -258,3 +258,52 @@ function omsorgcore_time_entries_submit(array $config, string $accessToken, stri
|
||||
->apiTimeEntriesIdSubmitPostWithHttpInfo($id);
|
||||
});
|
||||
}
|
||||
|
||||
// --- EmployeeFacilityDistances (eigene Fahrtstrecke km je Einrichtung, FR-EIN-4) ---
|
||||
// Own-Scope: die EmployeeId wird serverseitig aus dem JWT aufgelöst (siehe
|
||||
// MyFacilityDistancesController in omsorgCore), Connect schickt hier bewusst nie eine employeeId mit.
|
||||
// Kein Facilities-Recht nötig - die Einrichtungsauswahl kommt über einen eigenen, minimalen
|
||||
// Endpoint (nur Id/Name, keine Konditionen/CRM-Daten).
|
||||
|
||||
function omsorgcore_my_facility_distances_list(array $config, string $accessToken): array
|
||||
{
|
||||
return omsorgcore_call($config, function ($cfg) use ($accessToken) {
|
||||
$cfg->setAccessToken($accessToken);
|
||||
return (new \OmsorgCoreClient\Api\MyFacilityDistancesApi(new \GuzzleHttp\Client(), $cfg))
|
||||
->apiMeFacilityDistancesGetWithHttpInfo();
|
||||
});
|
||||
}
|
||||
|
||||
function omsorgcore_my_facility_distances_facility_options(array $config, string $accessToken): array
|
||||
{
|
||||
return omsorgcore_call($config, function ($cfg) use ($accessToken) {
|
||||
$cfg->setAccessToken($accessToken);
|
||||
return (new \OmsorgCoreClient\Api\MyFacilityDistancesApi(new \GuzzleHttp\Client(), $cfg))
|
||||
->apiMeFacilityDistancesFacilitiesGetWithHttpInfo();
|
||||
});
|
||||
}
|
||||
|
||||
function omsorgcore_my_facility_distances_create(array $config, string $accessToken, array $payload): array
|
||||
{
|
||||
$request = new \OmsorgCoreClient\Model\CreateMyFacilityDistanceRequest([
|
||||
'facility_id' => $payload['facilityId'],
|
||||
'distance_km' => $payload['distanceKm'],
|
||||
]);
|
||||
return omsorgcore_call($config, function ($cfg) use ($accessToken, $request) {
|
||||
$cfg->setAccessToken($accessToken);
|
||||
return (new \OmsorgCoreClient\Api\MyFacilityDistancesApi(new \GuzzleHttp\Client(), $cfg))
|
||||
->apiMeFacilityDistancesPostWithHttpInfo($request);
|
||||
});
|
||||
}
|
||||
|
||||
function omsorgcore_my_facility_distances_update(array $config, string $accessToken, string $id, array $payload): array
|
||||
{
|
||||
$request = new \OmsorgCoreClient\Model\UpdateMyFacilityDistanceRequest([
|
||||
'distance_km' => $payload['distanceKm'],
|
||||
]);
|
||||
return omsorgcore_call($config, function ($cfg) use ($accessToken, $id, $request) {
|
||||
$cfg->setAccessToken($accessToken);
|
||||
return (new \OmsorgCoreClient\Api\MyFacilityDistancesApi(new \GuzzleHttp\Client(), $cfg))
|
||||
->apiMeFacilityDistancesIdPutWithHttpInfo($id, $request);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -0,0 +1,193 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../lib/auth.php';
|
||||
require_once __DIR__ . '/../lib/layout.php';
|
||||
require_login();
|
||||
|
||||
if (!has_permission('EmployeeFacilityDistances', 'View')) {
|
||||
header('Location: dashboard.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
$canCreate = has_permission('EmployeeFacilityDistances', 'Create');
|
||||
$canEdit = has_permission('EmployeeFacilityDistances', 'Edit');
|
||||
$error = '';
|
||||
$success = false;
|
||||
$editId = null;
|
||||
|
||||
$facilitiesResult = omsorgcore_my_facility_distances_facility_options(_omsorgcore_config(), $_SESSION['omsorgcore_access_token']);
|
||||
$facilities = $facilitiesResult['ok'] ? $facilitiesResult['data'] : [];
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
verify_csrf();
|
||||
|
||||
$mode = $_POST['mode'] ?? 'create';
|
||||
$distanceKm = trim($_POST['distance_km'] ?? '');
|
||||
|
||||
if ($distanceKm === '' || !is_numeric($distanceKm) || (float) $distanceKm < 0) {
|
||||
$error = 'Entfernung (km) ist erforderlich und darf nicht negativ sein.';
|
||||
$editId = $mode === 'edit' ? ($_POST['distance_id'] ?? null) : null;
|
||||
} elseif ($mode === 'edit') {
|
||||
if (!$canEdit) {
|
||||
// Server lehnt das ohnehin über [RequirePermission(EmployeeFacilityDistances, Edit)] ab -
|
||||
// dieser Zweig greift nur, wenn jemand das Formular manuell postet, obwohl es clientseitig
|
||||
// gar nicht angezeigt wurde.
|
||||
$error = 'Keine Berechtigung, diese Entfernung zu bearbeiten.';
|
||||
} else {
|
||||
$distanceId = $_POST['distance_id'] ?? '';
|
||||
$result = omsorgcore_my_facility_distances_update(_omsorgcore_config(), $_SESSION['omsorgcore_access_token'], $distanceId, ['distanceKm' => (float) $distanceKm]);
|
||||
|
||||
if ($result['ok']) {
|
||||
header('Location: fahrtstrecken.php?updated=1');
|
||||
exit;
|
||||
}
|
||||
|
||||
$editId = $distanceId;
|
||||
$error = $result['status'] === 403
|
||||
? 'Keine Berechtigung, diese Entfernung zu bearbeiten.'
|
||||
: (is_string($result['data'] ?? null) ? $result['data'] : 'Entfernung konnte nicht gespeichert werden.');
|
||||
}
|
||||
} elseif (!$canCreate) {
|
||||
$error = 'Keine Berechtigung, eine Entfernung anzulegen.';
|
||||
} else {
|
||||
$facilityId = $_POST['facility_id'] ?? '';
|
||||
|
||||
if ($facilityId === '') {
|
||||
$error = 'Einrichtung ist erforderlich.';
|
||||
} else {
|
||||
$result = omsorgcore_my_facility_distances_create(_omsorgcore_config(), $_SESSION['omsorgcore_access_token'], [
|
||||
'facilityId' => $facilityId,
|
||||
'distanceKm' => (float) $distanceKm,
|
||||
]);
|
||||
|
||||
if ($result['ok']) {
|
||||
$success = true;
|
||||
} elseif ($result['status'] === 403) {
|
||||
$error = 'Keine Berechtigung, eine Entfernung anzulegen.';
|
||||
} else {
|
||||
$error = is_string($result['data'] ?? null) ? $result['data'] : 'Entfernung konnte nicht angelegt werden.';
|
||||
}
|
||||
}
|
||||
}
|
||||
} elseif (isset($_GET['edit'])) {
|
||||
$editId = $_GET['edit'];
|
||||
}
|
||||
|
||||
$listResult = omsorgcore_my_facility_distances_list(_omsorgcore_config(), $_SESSION['omsorgcore_access_token']);
|
||||
$distances = $listResult['ok'] ? $listResult['data'] : [];
|
||||
|
||||
$editDistance = null;
|
||||
if ($editId !== null) {
|
||||
foreach ($distances as $distance) {
|
||||
if ($distance['id'] === $editId) {
|
||||
$editDistance = $distance;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Fremde/ungültige Entfernung - Own-Scope-Filterung passiert serverseitig in
|
||||
// omsorgcore_my_facility_distances_list, hier nur zusätzlich zurück zu "Neue Entfernung".
|
||||
if ($editDistance === null) {
|
||||
$editId = null;
|
||||
}
|
||||
}
|
||||
|
||||
$facilitiesWithoutDistance = array_values(array_filter($facilities, function ($facility) use ($distances) {
|
||||
foreach ($distances as $distance) {
|
||||
if ($distance['facilityId'] === $facility['id']) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}));
|
||||
|
||||
layout_start('Fahrtstrecken – Mitarbeiter-App', 'fahrtstrecken');
|
||||
?>
|
||||
<h1 class="main-title">Fahrtstrecken</h1>
|
||||
<p class="hint" style="margin:-8px 0 20px">
|
||||
Trage hier die Entfernung (einfache Strecke, km) von deinem Wohnort zu den Einrichtungen ein, bei denen du im Einsatz bist. Diese Angabe ist Grundlage für die kilometerbasierte Fahrtkostenabrechnung.
|
||||
</p>
|
||||
|
||||
<div class="split-layout">
|
||||
<div class="glass" style="padding:24px">
|
||||
<h2 style="font-family:'KindelSerif',Georgia,serif;font-size:1.3rem;margin:0 0 18px">Meine Fahrtstrecken</h2>
|
||||
|
||||
<?php if (empty($distances)): ?>
|
||||
<p>Noch keine Entfernung erfasst.</p>
|
||||
<?php else: ?>
|
||||
<?php foreach ($distances as $distance): ?>
|
||||
<div style="padding:12px 0;border-bottom:1px solid rgba(0,0,0,.08)">
|
||||
<b><?= e($distance['facilityName']) ?></b> — <?= e(number_format((float) $distance['distanceKm'], 1, ',', '.')) ?> km
|
||||
<?php if ($canEdit): ?>
|
||||
<div style="margin-top:6px">
|
||||
<a href="fahrtstrecken.php?edit=<?= e($distance['id']) ?>">Bearbeiten</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php endforeach; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<div class="glass" style="padding:24px">
|
||||
<h2 style="font-family:'KindelSerif',Georgia,serif;font-size:1.3rem;margin:0 0 18px">
|
||||
<?= $editDistance ? 'Entfernung bearbeiten' : 'Neue Entfernung' ?>
|
||||
</h2>
|
||||
|
||||
<?php if ($success): ?>
|
||||
<div class="hint" style="margin-bottom:16px">Entfernung wurde angelegt.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if (isset($_GET['updated'])): ?>
|
||||
<div class="hint" style="margin-bottom:16px">Entfernung wurde aktualisiert.</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<div class="error" style="margin-bottom:16px"><?= e($error) ?></div>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php if ($editDistance): ?>
|
||||
<form method="post">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="mode" value="edit">
|
||||
<input type="hidden" name="distance_id" value="<?= e($editDistance['id']) ?>">
|
||||
<label>
|
||||
Einrichtung
|
||||
<input type="text" value="<?= e($editDistance['facilityName']) ?>" disabled>
|
||||
</label>
|
||||
<label>
|
||||
Entfernung (km, einfache Strecke)
|
||||
<input type="number" step="0.1" min="0" name="distance_km" value="<?= e($editDistance['distanceKm']) ?>" required>
|
||||
</label>
|
||||
<button type="submit" class="btn" style="width:100%;margin-top:6px">Änderungen speichern</button>
|
||||
</form>
|
||||
<p class="hint" style="text-align:center;margin-top:14px">
|
||||
<a href="fahrtstrecken.php">Abbrechen</a>
|
||||
</p>
|
||||
<?php elseif ($canCreate): ?>
|
||||
<?php if (empty($facilitiesWithoutDistance)): ?>
|
||||
<p class="hint">Für alle Einrichtungen ist bereits eine Entfernung erfasst.</p>
|
||||
<?php else: ?>
|
||||
<form method="post">
|
||||
<?= csrf_field() ?>
|
||||
<input type="hidden" name="mode" value="create">
|
||||
<label>
|
||||
Einrichtung
|
||||
<select name="facility_id" required>
|
||||
<option value="">— auswählen —</option>
|
||||
<?php foreach ($facilitiesWithoutDistance as $facility): ?>
|
||||
<option value="<?= e($facility['id']) ?>"><?= e($facility['name']) ?></option>
|
||||
<?php endforeach; ?>
|
||||
</select>
|
||||
</label>
|
||||
<label>
|
||||
Entfernung (km, einfache Strecke)
|
||||
<input type="number" step="0.1" min="0" name="distance_km" required>
|
||||
</label>
|
||||
<button type="submit" class="btn" style="width:100%;margin-top:6px">Entfernung anlegen</button>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
<?php else: ?>
|
||||
<p class="hint">Keine Berechtigung, eine Entfernung anzulegen.</p>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
layout_end();
|
||||
Reference in New Issue
Block a user