Add generated code

This commit is contained in:
Panayotis Kouvarakis 2026-02-23 21:32:04 +02:00
parent 62023f30f5
commit 4890554a0c
125 changed files with 40596 additions and 0 deletions

15
.gitignore vendored Normal file
View File

@ -0,0 +1,15 @@
# ref: https://github.com/github/gitignore/blob/master/Composer.gitignore
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
# composer.lock
# php-cs-fixer cache
.php_cs.cache
.php-cs-fixer.cache
# PHPUnit cache
.phpunit.result.cache

23
.openapi-generator-ignore Normal file
View File

@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

124
.openapi-generator/FILES Normal file
View File

@ -0,0 +1,124 @@
.gitignore
.openapi-generator-ignore
.php-cs-fixer.dist.php
.travis.yml
README.md
composer.json
docs/Api/CustomersApi.md
docs/Api/EshopApi.md
docs/Api/MasterDataApi.md
docs/Api/ProductsApi.md
docs/Api/WelcomeApi.md
docs/Model/Billing.md
docs/Model/CategoryDto.md
docs/Model/CategoryDtoListPagedResponse.md
docs/Model/Coupon.md
docs/Model/Coupons.md
docs/Model/Customer.md
docs/Model/CustomerDto.md
docs/Model/CustomerPagedResponse.md
docs/Model/EOrder.md
docs/Model/EOrderPagedResponse.md
docs/Model/EOrderStatus.md
docs/Model/EOrderStatusPagedResponse.md
docs/Model/Fee.md
docs/Model/Fees.md
docs/Model/Item.md
docs/Model/Items.md
docs/Model/MainCategoryDto.md
docs/Model/MainCategoryDtoPagedResponse.md
docs/Model/OikosDto.md
docs/Model/OikosDtoPagedResponse.md
docs/Model/OwnerDto.md
docs/Model/OwnerDtoPagedResponse.md
docs/Model/PersonalCategoryDto.md
docs/Model/PersonalCategoryDtoPagedResponse.md
docs/Model/ProblemDetails.md
docs/Model/ProductDto.md
docs/Model/ProductDtoPagedResponse.md
docs/Model/Shipping.md
docs/Model/SubCategoryDto.md
docs/Model/SubCategoryDtoPagedResponse.md
docs/Model/VatCategoryDto.md
docs/Model/VatCategoryDtoPagedResponse.md
git_push.sh
lib/Api/CustomersApi.php
lib/Api/EshopApi.php
lib/Api/MasterDataApi.php
lib/Api/ProductsApi.php
lib/Api/WelcomeApi.php
lib/ApiException.php
lib/Configuration.php
lib/HeaderSelector.php
lib/Model/Billing.php
lib/Model/CategoryDto.php
lib/Model/CategoryDtoListPagedResponse.php
lib/Model/Coupon.php
lib/Model/Coupons.php
lib/Model/Customer.php
lib/Model/CustomerDto.php
lib/Model/CustomerPagedResponse.php
lib/Model/EOrder.php
lib/Model/EOrderPagedResponse.php
lib/Model/EOrderStatus.php
lib/Model/EOrderStatusPagedResponse.php
lib/Model/Fee.php
lib/Model/Fees.php
lib/Model/Item.php
lib/Model/Items.php
lib/Model/MainCategoryDto.php
lib/Model/MainCategoryDtoPagedResponse.php
lib/Model/ModelInterface.php
lib/Model/OikosDto.php
lib/Model/OikosDtoPagedResponse.php
lib/Model/OwnerDto.php
lib/Model/OwnerDtoPagedResponse.php
lib/Model/PersonalCategoryDto.php
lib/Model/PersonalCategoryDtoPagedResponse.php
lib/Model/ProblemDetails.php
lib/Model/ProductDto.php
lib/Model/ProductDtoPagedResponse.php
lib/Model/Shipping.php
lib/Model/SubCategoryDto.php
lib/Model/SubCategoryDtoPagedResponse.php
lib/Model/VatCategoryDto.php
lib/Model/VatCategoryDtoPagedResponse.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Api/CustomersApiTest.php
test/Api/EshopApiTest.php
test/Api/MasterDataApiTest.php
test/Api/ProductsApiTest.php
test/Api/WelcomeApiTest.php
test/Model/BillingTest.php
test/Model/CategoryDtoListPagedResponseTest.php
test/Model/CategoryDtoTest.php
test/Model/CouponTest.php
test/Model/CouponsTest.php
test/Model/CustomerDtoTest.php
test/Model/CustomerPagedResponseTest.php
test/Model/CustomerTest.php
test/Model/EOrderPagedResponseTest.php
test/Model/EOrderStatusPagedResponseTest.php
test/Model/EOrderStatusTest.php
test/Model/EOrderTest.php
test/Model/FeeTest.php
test/Model/FeesTest.php
test/Model/ItemTest.php
test/Model/ItemsTest.php
test/Model/MainCategoryDtoPagedResponseTest.php
test/Model/MainCategoryDtoTest.php
test/Model/OikosDtoPagedResponseTest.php
test/Model/OikosDtoTest.php
test/Model/OwnerDtoPagedResponseTest.php
test/Model/OwnerDtoTest.php
test/Model/PersonalCategoryDtoPagedResponseTest.php
test/Model/PersonalCategoryDtoTest.php
test/Model/ProblemDetailsTest.php
test/Model/ProductDtoPagedResponseTest.php
test/Model/ProductDtoTest.php
test/Model/ShippingTest.php
test/Model/SubCategoryDtoPagedResponseTest.php
test/Model/SubCategoryDtoTest.php
test/Model/VatCategoryDtoPagedResponseTest.php
test/Model/VatCategoryDtoTest.php

View File

@ -0,0 +1 @@
7.12.0

29
.php-cs-fixer.dist.php Normal file
View File

@ -0,0 +1,29 @@
<?php
/**
* @generated
* @link https://github.com/FriendsOfPHP/PHP-CS-Fixer/blob/HEAD/doc/config.rst
*/
$finder = PhpCsFixer\Finder::create()
->in(__DIR__)
->exclude('vendor')
->exclude('test')
->exclude('tests')
;
$config = new PhpCsFixer\Config();
return $config->setRules([
'@PSR12' => true,
'phpdoc_order' => true,
'array_syntax' => [ 'syntax' => 'short' ],
'strict_comparison' => true,
'strict_param' => true,
'no_trailing_whitespace' => false,
'no_trailing_whitespace_in_comment' => false,
'braces' => false,
'single_blank_line_at_eof' => false,
'blank_line_after_namespace' => false,
'no_leading_import_slash' => false,
])
->setFinder($finder)
;

8
.travis.yml Normal file
View File

@ -0,0 +1,8 @@
language: php
# Bionic environment has preinstalled PHP from 7.1 to 7.4
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.4
before_install: "composer install"
script: "vendor/bin/phpunit"

39
composer.json Normal file
View File

@ -0,0 +1,39 @@
{
"name": "europharmacy/euromedica-client",
"description": "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": "^7.4 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^7.3",
"guzzlehttp/psr7": "^1.7 || ^2.0"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.5"
},
"autoload": {
"psr-4": { "Europharmacy\\EuromedicaClient\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "Europharmacy\\EuromedicaClient\\Test\\" : "test/" }
}
}

200
docs/Api/CustomersApi.md Normal file
View File

@ -0,0 +1,200 @@
# Europharmacy\EuromedicaClient\CustomersApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiCustomersGet()**](CustomersApi.md#apiCustomersGet) | **GET** /api/Customers | Αναζήτηση πελατών |
| [**apiCustomersIdGet()**](CustomersApi.md#apiCustomersIdGet) | **GET** /api/Customers/{id} | Προβολή πελάτη βάσει Id |
| [**apiCustomersPost()**](CustomersApi.md#apiCustomersPost) | **POST** /api/Customers | Εισαγωγή ή επεξεργασία πελάτη |
## `apiCustomersGet()`
```php
apiCustomersGet($search_by_name, $search_by_phone, $search_by_amka, $search_by_afm, $page, $size): \Europharmacy\EuromedicaClient\Model\CustomerPagedResponse
```
Αναζήτηση πελατών
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\CustomersApi(
// 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_by_name = ''; // string |
$search_by_phone = ''; // string |
$search_by_amka = ''; // string |
$search_by_afm = ''; // string |
$page = 1; // int |
$size = 1000; // int |
try {
$result = $apiInstance->apiCustomersGet($search_by_name, $search_by_phone, $search_by_amka, $search_by_afm, $page, $size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomersApi->apiCustomersGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search_by_name** | **string**| | [optional] [default to &#39;&#39;] |
| **search_by_phone** | **string**| | [optional] [default to &#39;&#39;] |
| **search_by_amka** | **string**| | [optional] [default to &#39;&#39;] |
| **search_by_afm** | **string**| | [optional] [default to &#39;&#39;] |
| **page** | **int**| | [optional] [default to 1] |
| **size** | **int**| | [optional] [default to 1000] |
### Return type
[**\Europharmacy\EuromedicaClient\Model\CustomerPagedResponse**](../Model/CustomerPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiCustomersIdGet()`
```php
apiCustomersIdGet($id): \Europharmacy\EuromedicaClient\Model\CustomerPagedResponse
```
Προβολή πελάτη βάσει Id
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\CustomersApi(
// 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 = 56; // int |
try {
$result = $apiInstance->apiCustomersIdGet($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomersApi->apiCustomersIdGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **id** | **int**| | |
### Return type
[**\Europharmacy\EuromedicaClient\Model\CustomerPagedResponse**](../Model/CustomerPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiCustomersPost()`
```php
apiCustomersPost($customer_dto): \Europharmacy\EuromedicaClient\Model\CustomerPagedResponse
```
Εισαγωγή ή επεξεργασία πελάτη
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\CustomersApi(
// 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
);
$customer_dto = new \Europharmacy\EuromedicaClient\Model\CustomerDto(); // \Europharmacy\EuromedicaClient\Model\CustomerDto |
try {
$result = $apiInstance->apiCustomersPost($customer_dto);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling CustomersApi->apiCustomersPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **customer_dto** | [**\Europharmacy\EuromedicaClient\Model\CustomerDto**](../Model/CustomerDto.md)| | [optional] |
### Return type
[**\Europharmacy\EuromedicaClient\Model\CustomerPagedResponse**](../Model/CustomerPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: `application/json-patch+json`, `application/json`, `application/*+json`
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

141
docs/Api/EshopApi.md Normal file
View File

@ -0,0 +1,141 @@
# Europharmacy\EuromedicaClient\EshopApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiEshopOrderIdPost()**](EshopApi.md#apiEshopOrderIdPost) | **POST** /api/Eshop/{orderId} | Εισαγωγή / Τροποποίηση παραγγελίας |
| [**apiEshopStatusGet()**](EshopApi.md#apiEshopStatusGet) | **GET** /api/Eshop/Status | Κατάσταση παραγγελιών |
## `apiEshopOrderIdPost()`
```php
apiEshopOrderIdPost($order_id, $e_order): \Europharmacy\EuromedicaClient\Model\EOrderPagedResponse
```
Εισαγωγή / Τροποποίηση παραγγελίας
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\EshopApi(
// 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
);
$order_id = 56; // int | Ο αριθμός της παραγγελίας
$e_order = new \Europharmacy\EuromedicaClient\Model\EOrder(); // \Europharmacy\EuromedicaClient\Model\EOrder |
try {
$result = $apiInstance->apiEshopOrderIdPost($order_id, $e_order);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EshopApi->apiEshopOrderIdPost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **order_id** | **int**| Ο αριθμός της παραγγελίας | |
| **e_order** | [**\Europharmacy\EuromedicaClient\Model\EOrder**](../Model/EOrder.md)| | [optional] |
### Return type
[**\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse**](../Model/EOrderPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: `application/json`
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiEshopStatusGet()`
```php
apiEshopStatusGet($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size): \Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse
```
Κατάσταση παραγγελιών
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\EshopApi(
// 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
);
$modified_last_days = 60; // int | Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες
$order_id = 0; // int | Αν έχει τιμή > 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων
$modified_after = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays
$include_creata_date = false; // bool | By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων
$page = 1; // int |
$size = 1000; // int |
try {
$result = $apiInstance->apiEshopStatusGet($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling EshopApi->apiEshopStatusGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **modified_last_days** | **int**| Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες | [optional] [default to 60] |
| **order_id** | **int**| Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων | [optional] [default to 0] |
| **modified_after** | **\DateTime**| Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays | [optional] |
| **include_creata_date** | **bool**| By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων | [optional] [default to false] |
| **page** | **int**| | [optional] [default to 1] |
| **size** | **int**| | [optional] [default to 1000] |
### Return type
[**\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse**](../Model/EOrderStatusPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

413
docs/Api/MasterDataApi.md Normal file
View File

@ -0,0 +1,413 @@
# Europharmacy\EuromedicaClient\MasterDataApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiMasterDataCategoriesGet()**](MasterDataApi.md#apiMasterDataCategoriesGet) | **GET** /api/MasterData/Categories | Κατηγορίες (Product.categId) |
| [**apiMasterDataMainCategoriesGet()**](MasterDataApi.md#apiMasterDataMainCategoriesGet) | **GET** /api/MasterData/MainCategories | Κύριες κατηγορίες (Product.mainCategId) |
| [**apiMasterDataOikoiGet()**](MasterDataApi.md#apiMasterDataOikoiGet) | **GET** /api/MasterData/Oikoi | Οίκοι (Product.oikosId) |
| [**apiMasterDataOwnersGet()**](MasterDataApi.md#apiMasterDataOwnersGet) | **GET** /api/MasterData/Owners | Εταιρία (Product.ownerId) |
| [**apiMasterDataPersonalCategoriesGet()**](MasterDataApi.md#apiMasterDataPersonalCategoriesGet) | **GET** /api/MasterData/PersonalCategories | Προσωπικές Κατηγορίες (Product.perCatId , Product.perCat2Id , Product.perCat3Id) |
| [**apiMasterDataSubCategoriesGet()**](MasterDataApi.md#apiMasterDataSubCategoriesGet) | **GET** /api/MasterData/SubCategories | Κατηγορίες (Product.subCategId) |
| [**apiMasterDataVatCaterogiesGet()**](MasterDataApi.md#apiMasterDataVatCaterogiesGet) | **GET** /api/MasterData/VatCaterogies | Κατηφορίες ΦΠΑ |
## `apiMasterDataCategoriesGet()`
```php
apiMasterDataCategoriesGet(): \Europharmacy\EuromedicaClient\Model\CategoryDtoListPagedResponse
```
Κατηγορίες (Product.categId)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataCategoriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\CategoryDtoListPagedResponse**](../Model/CategoryDtoListPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataMainCategoriesGet()`
```php
apiMasterDataMainCategoriesGet(): \Europharmacy\EuromedicaClient\Model\MainCategoryDtoPagedResponse
```
Κύριες κατηγορίες (Product.mainCategId)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataMainCategoriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataMainCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\MainCategoryDtoPagedResponse**](../Model/MainCategoryDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataOikoiGet()`
```php
apiMasterDataOikoiGet(): \Europharmacy\EuromedicaClient\Model\OikosDtoPagedResponse
```
Οίκοι (Product.oikosId)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataOikoiGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataOikoiGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\OikosDtoPagedResponse**](../Model/OikosDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataOwnersGet()`
```php
apiMasterDataOwnersGet(): \Europharmacy\EuromedicaClient\Model\OwnerDtoPagedResponse
```
Εταιρία (Product.ownerId)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataOwnersGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataOwnersGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\OwnerDtoPagedResponse**](../Model/OwnerDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataPersonalCategoriesGet()`
```php
apiMasterDataPersonalCategoriesGet(): \Europharmacy\EuromedicaClient\Model\PersonalCategoryDtoPagedResponse
```
Προσωπικές Κατηγορίες (Product.perCatId , Product.perCat2Id , Product.perCat3Id)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataPersonalCategoriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataPersonalCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\PersonalCategoryDtoPagedResponse**](../Model/PersonalCategoryDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataSubCategoriesGet()`
```php
apiMasterDataSubCategoriesGet(): \Europharmacy\EuromedicaClient\Model\SubCategoryDtoPagedResponse
```
Κατηγορίες (Product.subCategId)
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataSubCategoriesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataSubCategoriesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\SubCategoryDtoPagedResponse**](../Model/SubCategoryDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiMasterDataVatCaterogiesGet()`
```php
apiMasterDataVatCaterogiesGet(): \Europharmacy\EuromedicaClient\Model\VatCategoryDtoPagedResponse
```
Κατηφορίες ΦΠΑ
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\MasterDataApi(
// 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->apiMasterDataVatCaterogiesGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling MasterDataApi->apiMasterDataVatCaterogiesGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
[**\Europharmacy\EuromedicaClient\Model\VatCategoryDtoPagedResponse**](../Model/VatCategoryDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

202
docs/Api/ProductsApi.md Normal file
View File

@ -0,0 +1,202 @@
# Europharmacy\EuromedicaClient\ProductsApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiProductsBarcodeGet()**](ProductsApi.md#apiProductsBarcodeGet) | **GET** /api/Products/{barcode} | Αναζήτηση βάσει barcode |
| [**apiProductsDataboxBarcodePost()**](ProductsApi.md#apiProductsDataboxBarcodePost) | **POST** /api/Products/Databox/{Barcode} | |
| [**apiProductsGet()**](ProductsApi.md#apiProductsGet) | **GET** /api/Products | Αναζήτηση ειδών |
## `apiProductsBarcodeGet()`
```php
apiProductsBarcodeGet($barcode): \Europharmacy\EuromedicaClient\Model\ProductDto
```
Αναζήτηση βάσει barcode
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\ProductsApi(
// 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
);
$barcode = 'barcode_example'; // string |
try {
$result = $apiInstance->apiProductsBarcodeGet($barcode);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->apiProductsBarcodeGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **barcode** | **string**| | |
### Return type
[**\Europharmacy\EuromedicaClient\Model\ProductDto**](../Model/ProductDto.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiProductsDataboxBarcodePost()`
```php
apiProductsDataboxBarcodePost($barcode): \Europharmacy\EuromedicaClient\Model\ProductDto
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\ProductsApi(
// 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
);
$barcode = 'barcode_example'; // string
try {
$result = $apiInstance->apiProductsDataboxBarcodePost($barcode);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->apiProductsDataboxBarcodePost: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **barcode** | **string**| | |
### Return type
[**\Europharmacy\EuromedicaClient\Model\ProductDto**](../Model/ProductDto.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiProductsGet()`
```php
apiProductsGet($search_text, $search_meds, $search_user_items, $visibly_web, $modified_after, $page, $size): \Europharmacy\EuromedicaClient\Model\ProductDtoPagedResponse
```
Αναζήτηση ειδών
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\ProductsApi(
// 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_text = 'search_text_example'; // string | Αναζήτηση είδους βάσει ονομασίας/barcode , μπορεί να είναι και κενό
$search_meds = true; // bool | Αναζήτηση φαρμάκων
$search_user_items = true; // bool | Αναζήτηση παραφαρμάκων
$visibly_web = True; // bool | Αν έχει τιμή θα επιστρέφει όσα πληρούν τη συνθήκη (Αυτόματα εξαιρεί τα φάρμακα)
$modified_after = new \DateTime('2013-10-20T19:20:30+01:00'); // \DateTime | Αν έχει τιμή θα επιστρέφει όσα έχουν τροποποιηθεί μετά την επιλεγμένη ημερομηνία π.χ. (2024-3-12 12:01)
$page = 1; // int |
$size = 1000; // int |
try {
$result = $apiInstance->apiProductsGet($search_text, $search_meds, $search_user_items, $visibly_web, $modified_after, $page, $size);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ProductsApi->apiProductsGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **search_text** | **string**| Αναζήτηση είδους βάσει ονομασίας/barcode , μπορεί να είναι και κενό | [optional] |
| **search_meds** | **bool**| Αναζήτηση φαρμάκων | [optional] [default to true] |
| **search_user_items** | **bool**| Αναζήτηση παραφαρμάκων | [optional] [default to true] |
| **visibly_web** | **bool**| Αν έχει τιμή θα επιστρέφει όσα πληρούν τη συνθήκη (Αυτόματα εξαιρεί τα φάρμακα) | [optional] |
| **modified_after** | **\DateTime**| Αν έχει τιμή θα επιστρέφει όσα έχουν τροποποιηθεί μετά την επιλεγμένη ημερομηνία π.χ. (2024-3-12 12:01) | [optional] |
| **page** | **int**| | [optional] [default to 1] |
| **size** | **int**| | [optional] [default to 1000] |
### Return type
[**\Europharmacy\EuromedicaClient\Model\ProductDtoPagedResponse**](../Model/ProductDtoPagedResponse.md)
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

168
docs/Api/WelcomeApi.md Normal file
View File

@ -0,0 +1,168 @@
# Europharmacy\EuromedicaClient\WelcomeApi
All URIs are relative to http://localhost, except if the operation defines another base path.
| Method | HTTP request | Description |
| ------------- | ------------- | ------------- |
| [**apiWelcomeGet()**](WelcomeApi.md#apiWelcomeGet) | **GET** /api/Welcome | |
| [**apiWelcomeHead()**](WelcomeApi.md#apiWelcomeHead) | **HEAD** /api/Welcome | |
| [**apiWelcomeSecureGet()**](WelcomeApi.md#apiWelcomeSecureGet) | **GET** /api/Welcome/Secure | |
## `apiWelcomeGet()`
```php
apiWelcomeGet(): string
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Europharmacy\EuromedicaClient\Api\WelcomeApi(
// 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()
);
try {
$result = $apiInstance->apiWelcomeGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WelcomeApi->apiWelcomeGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**string**
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)
## `apiWelcomeHead()`
```php
apiWelcomeHead()
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Europharmacy\EuromedicaClient\Api\WelcomeApi(
// 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()
);
try {
$apiInstance->apiWelcomeHead();
} catch (Exception $e) {
echo 'Exception when calling WelcomeApi->apiWelcomeHead: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
void (empty response body)
### Authorization
No authorization required
### 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)
## `apiWelcomeSecureGet()`
```php
apiWelcomeSecureGet(): string
```
### Example
```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: basic
$config = Europharmacy\EuromedicaClient\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Europharmacy\EuromedicaClient\Api\WelcomeApi(
// 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->apiWelcomeSecureGet();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WelcomeApi->apiWelcomeSecureGet: ', $e->getMessage(), PHP_EOL;
}
```
### Parameters
This endpoint does not need any parameter.
### Return type
**string**
### Authorization
[basic](../../README.md#basic)
### HTTP request headers
- **Content-Type**: Not defined
- **Accept**: `application/json`
[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

24
docs/Model/Billing.md Normal file
View File

@ -0,0 +1,24 @@
# # Billing
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**last_name** | **string** | Επίθετο | [optional]
**first_name** | **string** | Όνομα | [optional]
**address** | **string** | Διεύθυνση | [optional]
**city** | **string** | | [optional]
**postcode** | **string** | | [optional]
**state** | **string** | | [optional]
**country** | **string** | | [optional]
**country_code** | **string** | ΚΩΔΙΚΟΣ ΧΩΡΑΣ ISO 3166 ALPHA-2 | [optional]
**phone** | **string** | | [optional]
**cellphone** | **string** | | [optional]
**email** | **string** | | [optional]
**is_invoice** | **int** | Αν ο πελάτης θέλει τιμολόγιο τιμή 1 | [optional]
**commercial_name** | **string** | η επωνυμία που θα κοπεί το τιμολόγιο | [optional]
**tax_number** | **string** | Αφμ πελάτη , υποχρεωτικό σε περίπτωση τιμολογίου | [optional]
**tax_office** | **string** | ΔΟΥ πελάτη , υποχρεωτικό σε περίπτωση τιμολογίου | [optional]
**activity** | **string** | Επάγγελμα , υποχρεωτικό σε περίπτωση τιμολογίου | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

10
docs/Model/CategoryDto.md Normal file
View File

@ -0,0 +1,10 @@
# # CategoryDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**categ_id** | **string** | | [optional]
**categ_desc** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # CategoryDtoListPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | **\Europharmacy\EuromedicaClient\Model\CategoryDto[][]** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

10
docs/Model/Coupon.md Normal file
View File

@ -0,0 +1,10 @@
# # Coupon
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**code** | **string** | προαιρετικό πεδίο , όνομα κουπονιού | [optional]
**amount** | **float** | αξία κουπονιού | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

9
docs/Model/Coupons.md Normal file
View File

@ -0,0 +1,9 @@
# # Coupons
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**coupon_list** | [**\Europharmacy\EuromedicaClient\Model\Coupon[]**](Coupon.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

30
docs/Model/Customer.md Normal file
View File

@ -0,0 +1,30 @@
# # Customer
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**last_name** | **string** | | [optional]
**first_name** | **string** | | [optional]
**nikcname** | **string** | | [optional]
**phone** | **string** | ΣΤΑΘΕΡΟ ΤΗΛΕΦΩΝΟ | [optional]
**mobile** | **string** | ΚΙΝΗΤΟ ΤΗΛΕΦΩΝΟ | [optional]
**family_name** | **string** | ΟΝΟΜΑ ΟΙΚΟΓΕΝΕΙΑΣ ΕΦΟΣΟΝ ΑΝΗΚΕΙ ΣΕ ΚΑΠΟΙΑ | [optional]
**amka** | **string** | ΑΜΚΑ | [optional]
**bonus_card** | **string** | | [optional]
**address** | **string** | ΔΙΕΥΘΥΝΣΗ | [optional]
**post_code** | **string** | ΤΑΧΥΔΡΟΜΙΚΟΣ ΚΩΔΙΚΑΣ | [optional]
**city** | **string** | | [optional]
**country_code** | **string** | ΚΩΔΙΚΟΣ ΧΩΡΑΣ ISO 3166 ALPHA-2 | [optional]
**country_name** | **string** | | [optional]
**birth_day** | **\DateTime** | | [optional]
**tax_number** | **string** | ΑΦΜ ΠΕΛΑΤΗ | [optional]
**tax_office** | **string** | ΔΟΥ | [optional]
**profession** | **string** | ΕΠΑΓΓΕΛΜΑ | [optional]
**brand_id** | **int** | ΚΩΔΙΚΟΣ ΕΓΚΑΤΑΣΤΑΣΗΣ | [optional]
**email** | **string** | | [optional]
**notes** | **string** | | [optional]
**eshop_id** | **int** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

28
docs/Model/CustomerDto.md Normal file
View File

@ -0,0 +1,28 @@
# # CustomerDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Id πελάτη , -1 αν πρόκειται για καινούριο πελάτη | [optional] [default to -1]
**last_name** | **string** | | [optional] [default to '']
**first_name** | **string** | | [optional] [default to '']
**nikcname** | **string** | | [optional] [default to '']
**phone** | **string** | ΣΤΑΘΕΡΟ ΤΗΛΕΦΩΝΟ | [optional]
**mobile** | **string** | ΚΙΝΗΤΟ ΤΗΛΕΦΩΝΟ | [optional]
**amka** | **string** | ΑΜΚΑ | [optional]
**address** | **string** | ΔΙΕΥΘΥΝΣΗ | [optional]
**post_code** | **string** | ΤΑΧΥΔΡΟΜΙΚΟΣ ΚΩΔΙΚΑΣ | [optional]
**city** | **string** | | [optional]
**country_code** | **string** | ΚΩΔΙΚΟΣ ΧΩΡΑΣ ISO 3166 ALPHA-2 | [optional] [default to 'GR']
**country_name** | **string** | | [optional]
**birth_day** | **\DateTime** | | [optional]
**tax_number** | **string** | ΑΦΜ ΠΕΛΑΤΗ | [optional]
**tax_office** | **string** | ΔΟΥ | [optional]
**profession** | **string** | ΕΠΑΓΓΕΛΜΑ | [optional]
**brand_id** | **int** | ΚΩΔΙΚΟΣ ΕΓΚΑΤΑΣΤΑΣΗΣ | [optional] [default to 0]
**email** | **string** | | [optional]
**notes** | **string** | | [optional]
**eshop_id** | **int** | | [optional] [default to 0]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # CustomerPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\Customer[]**](Customer.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

29
docs/Model/EOrder.md Normal file
View File

@ -0,0 +1,29 @@
# # EOrder
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**order_id** | **int** | | [optional]
**status_id** | **int** | ΚΑΤΑΣΤΑΣΗ ΠΑΡΑΓΓΕΛΙΑΣ {1,\&quot;Σε διεκπεραίωση\&quot; }, {2,\&quot;Εκκρεμεί πληρωμή\&quot; }, {3,\&quot;Ολοκληρωμένη\&quot; }, { 4,\&quot;Αναμονή τραπεζικής πληρώμης\&quot; }, { 5,\&quot;Αποτυχία πληρωμής\&quot; }, { 6,\&quot;Ακυρωμένη\&quot; }, { 7,\&quot;Επιστροφή χρημάτων\&quot; }, { 8,\&quot;Τιμολογημένη\&quot; } | [optional]
**admin_url** | **string** | προαιρετικό πεδίο , διαχειριστικό eshop | [optional]
**status** | **string** | προαιρετικό πεδίο , λεκτικό της κατάστασης | [optional]
**date_created** | **\DateTime** | | [optional]
**date_completed** | **\DateTime** | συμπληρώνεται από το erp όταν ολοκληρωθεί η παραγγελία | [optional]
**date_modified** | **\DateTime** | | [optional]
**date_paid** | **\DateTime** | συμπληρώνεται από το eshop οταν γίνει πληρωμή με κάρτα | [optional]
**payment_method_id** | **int** | ΤΡΟΠΟΙ ΠΛΗΡΩΜΗΣ { 1 ,\&quot;Aντικαταβολή\&quot; },{ 2 ,\&quot;Τραπεζική κατάθεση\&quot; }, { 3 ,\&quot;Paypal\&quot; }, { 4 ,\&quot;Πιστ./Χρεωσ. Κάρτα\&quot; },{ 5 ,\&quot;Κατάστημα\&quot; },{ 6 ,\&quot;Eshop\&quot; } | [optional]
**payment_method** | **string** | προαιρετικό πεδίο , λεκτικό του τρόπου πληρωμής | [optional]
**shipping_method** | **string** | Τρόπος αποστολής | [optional]
**client_id** | **int** | το id πελατη στο eshop , επισκέπτης -1 | [optional]
**notes** | **string** | | [optional]
**net_amount** | **float** | προαιρετικό πεδίο , Αξία παραγγελίας προ ΦΠΑ | [optional]
**vat_amount** | **float** | προαιρετικό πεδίο , Αξία ΦΠΑ | [optional]
**total_amount** | **float** | Συνολική αξία παραγγελίας | [optional]
**billing** | [**\Europharmacy\EuromedicaClient\Model\Billing**](Billing.md) | | [optional]
**shipping** | [**\Europharmacy\EuromedicaClient\Model\Shipping**](Shipping.md) | | [optional]
**items** | [**\Europharmacy\EuromedicaClient\Model\Items**](Items.md) | | [optional]
**fees** | [**\Europharmacy\EuromedicaClient\Model\Fees**](Fees.md) | | [optional]
**coupons** | [**\Europharmacy\EuromedicaClient\Model\Coupons**](Coupons.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # EOrderPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\EOrder[]**](EOrder.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,16 @@
# # EOrderStatus
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**order_id** | **int** | | [optional]
**status_id** | **int** | | [optional]
**status** | **string** | | [optional] [readonly]
**date_created** | **\DateTime** | | [optional]
**date_completed** | **\DateTime** | Συμπληρώνεται από το erp όταν ολοκληρωθεί η παραγγελία | [optional]
**date_modified** | **\DateTime** | Συμπληρώνεται από το erp όταν τροποποιηθεί η παραγγελία | [optional]
**date_paid** | **\DateTime** | Συμπληρώνεται από το eshop όταν γίνει πληρωμή με κάρτα | [optional]
**qr_url** | **string** | Συμπληρώνεται από το erp όταν έχει εκδοθεί απόδειξη από πάροχο | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # EOrderStatusPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\EOrderStatus[]**](EOrderStatus.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

13
docs/Model/Fee.md Normal file
View File

@ -0,0 +1,13 @@
# # Fee
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**fee_id** | **int** | { \&quot;1\&quot; ,ΕΞΟΔΑ ΑΝΤΙΚΑΤΑΒΟΛΗΣ } { \&quot;2\&quot; ,ΕΞΟΔΑ ΑΠΟΣΤΟΛΗΣ } { \&quot;3\&quot; ,ΕΞΟΔΑ ΣΥΣΚΕΥΑΣΙΑΣ } | [optional]
**fee_name** | **string** | | [optional]
**amount** | **float** | | [optional]
**vat_amount** | **float** | | [optional]
**total** | **float** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

9
docs/Model/Fees.md Normal file
View File

@ -0,0 +1,9 @@
# # Fees
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**fee_list** | [**\Europharmacy\EuromedicaClient\Model\Fee[]**](Fee.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

15
docs/Model/Item.md Normal file
View File

@ -0,0 +1,15 @@
# # Item
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**product_title** | **string** | όνομα προϊόντος | [optional]
**erp_id** | **string** | to uniqId του Product | [optional]
**barcode** | **string** | barcode προϊόντος μόνο ένα σε περίπτωση που υπάρχουν περισσότερα του ενός | [optional]
**qty** | **float** | | [optional]
**unit_price** | **float** | λιανική τιμή προ έκπτωσης | [optional]
**discount_percentage** | **float** | ποσοστιαία έκπτωση | [optional]
**total** | **float** | Συνολική αξία προϊόντων μετά την έκπτωση (qty * unitPrice * ((100 - discountPercentage)/100)) | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

9
docs/Model/Items.md Normal file
View File

@ -0,0 +1,9 @@
# # Items
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**item_list** | [**\Europharmacy\EuromedicaClient\Model\Item[]**](Item.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,10 @@
# # MainCategoryDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**main_id** | **string** | | [optional]
**main_desc** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # MainCategoryDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\MainCategoryDto[]**](MainCategoryDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

11
docs/Model/OikosDto.md Normal file
View File

@ -0,0 +1,11 @@
# # OikosDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**desc** | **string** | | [optional]
**owner_id** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # OikosDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\OikosDto[]**](OikosDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

10
docs/Model/OwnerDto.md Normal file
View File

@ -0,0 +1,10 @@
# # OwnerDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**desc** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # OwnerDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\OwnerDto[]**](OwnerDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,13 @@
# # PersonalCategoryDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **string** | | [optional]
**name** | **string** | | [optional]
**parent_id** | **string** | | [optional]
**visible_web** | **bool** | | [optional]
**eng_name** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # PersonalCategoryDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\PersonalCategoryDto[]**](PersonalCategoryDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,13 @@
# # ProblemDetails
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**type** | **string** | | [optional]
**title** | **string** | | [optional]
**status** | **int** | | [optional]
**detail** | **string** | | [optional]
**instance** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

44
docs/Model/ProductDto.md Normal file
View File

@ -0,0 +1,44 @@
# # ProductDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**uniq_id** | **string** | Μοναδικός κωδικός είδους | [optional]
**product_name** | **string** | Τίτλος είδους | [optional]
**retail_price** | **float** | Λιανική τιμή | [optional]
**whole_price** | **float** | Χονδρική τιμή | [optional]
**vat** | **float** | Φπα είδους | [optional]
**suggest_price** | **float** | Τιμή καταλόγου | [optional]
**eshop_price** | **float** | Τιμή eshop | [optional]
**ref_price** | **float** | Τιμή Αναφοράς - Για φάρμακα | [optional]
**eshop_discount** | **float** | | [optional]
**stock** | **float** | Απόθεμα Φαρμακείου | [optional]
**reserved_stock** | **float** | Δεσμευμένο απόθεμα | [optional]
**available_stock** | **float** | Διαθέσιμο Απόθεμα | [optional]
**robot_stock** | **float** | | [optional]
**barcode** | **string** | | [optional]
**barcode_list** | **string[]** | | [optional]
**oikos_id** | **string** | Τιμή καταλόγου | [optional]
**owner_id** | **string** | | [optional]
**main_categ_id** | **string** | | [optional]
**categ_id** | **string** | | [optional]
**sub_categ_id** | **string** | | [optional]
**per_cat_id** | **string** | | [optional]
**per_cat2_id** | **string** | | [optional]
**per_cat3_id** | **string** | | [optional]
**mock_id** | **string** | Κωδικός Παραλλαγής | [optional]
**mock_name** | **string** | Όνομα Παραλλαγής | [optional]
**measurement_unit** | **string** | { \&quot;\&quot;, \&quot;\&quot;}, { \&quot;Size\&quot;, \&quot;Μέγεθος\&quot; } , {\&quot;Mass\&quot; , \&quot;Όγκος (ml)\&quot; }, {\&quot;Pieces\&quot; , \&quot;Τεμάχια\&quot; }, { \&quot;Weight\&quot;, \&quot;Βάρος (kg)\&quot; } | [optional]
**measurement_value** | **string** | | [optional]
**weight** | **float** | Βάρος | [optional]
**color** | **string** | Χρώμα | [optional]
**shelf** | **string** | Ράφι | [optional]
**position** | **string** | Θέση | [optional]
**last_supplier** | **string** | | [optional]
**web_visible** | **bool** | Αν θα εμφανίζεται το site | [optional]
**img_url** | **string** | | [optional]
**is_med** | **bool** | | [optional]
**last_upd** | **\DateTime** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # ProductDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\ProductDto[]**](ProductDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

19
docs/Model/Shipping.md Normal file
View File

@ -0,0 +1,19 @@
# # Shipping
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**last_name** | **string** | | [optional]
**first_name** | **string** | | [optional]
**address** | **string** | | [optional]
**city** | **string** | | [optional]
**postcode** | **string** | | [optional]
**state** | **string** | | [optional]
**country** | **string** | | [optional]
**country_code** | **string** | | [optional]
**phone** | **string** | | [optional]
**cellphone** | **string** | | [optional]
**email** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,11 @@
# # SubCategoryDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**sc_id** | **string** | | [optional]
**sc_desc** | **string** | | [optional]
**ca_id** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # SubCategoryDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\SubCategoryDto[]**](SubCategoryDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,11 @@
# # VatCategoryDto
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**vat_code** | **int** | | [optional]
**vat_value** | **float** | | [optional]
**vat_desc** | **string** | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

View File

@ -0,0 +1,18 @@
# # VatCategoryDtoPagedResponse
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**time_stamp** | **\DateTime** | | [optional] [readonly]
**page_number** | **int** | | [optional]
**page_size** | **int** | | [optional]
**total_items** | **int** | | [optional]
**total_pages** | **int** | | [optional] [readonly]
**last_page** | **bool** | | [optional] [readonly]
**data_size** | **int** | | [optional] [readonly]
**is_success** | **bool** | | [optional] [readonly]
**errors** | **string[]** | | [optional]
**data** | [**\Europharmacy\EuromedicaClient\Model\VatCategoryDto[]**](VatCategoryDto.md) | | [optional]
[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)

57
git_push.sh Normal file
View File

@ -0,0 +1,57 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host=""
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id=""
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id=""
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note=""
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

1536
lib/Api/CustomersApi.php Normal file

File diff suppressed because it is too large Load Diff

936
lib/Api/EshopApi.php Normal file
View File

@ -0,0 +1,936 @@
<?php
/**
* EshopApi
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Europharmacy\EuromedicaClient\ApiException;
use Europharmacy\EuromedicaClient\Configuration;
use Europharmacy\EuromedicaClient\HeaderSelector;
use Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* EshopApi Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class EshopApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiEshopOrderIdPost' => [
'application/json',
],
'apiEshopStatusGet' => [
'application/json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiEshopOrderIdPost
*
* Εισαγωγή / Τροποποίηση παραγγελίας
*
* @param int $order_id Ο αριθμός της παραγγελίας (required)
* @param \Europharmacy\EuromedicaClient\Model\EOrder|null $e_order (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopOrderIdPost'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \Europharmacy\EuromedicaClient\Model\EOrderPagedResponse|\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse
*/
public function apiEshopOrderIdPost($order_id, $e_order = null, string $contentType = self::contentTypes['apiEshopOrderIdPost'][0])
{
list($response) = $this->apiEshopOrderIdPostWithHttpInfo($order_id, $e_order, $contentType);
return $response;
}
/**
* Operation apiEshopOrderIdPostWithHttpInfo
*
* Εισαγωγή / Τροποποίηση παραγγελίας
*
* @param int $order_id Ο αριθμός της παραγγελίας (required)
* @param \Europharmacy\EuromedicaClient\Model\EOrder|null $e_order (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopOrderIdPost'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \Europharmacy\EuromedicaClient\Model\EOrderPagedResponse|\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiEshopOrderIdPostWithHttpInfo($order_id, $e_order = null, string $contentType = self::contentTypes['apiEshopOrderIdPost'][0])
{
$request = $this->apiEshopOrderIdPostRequest($order_id, $e_order, $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:
if ('\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, '\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
case 400:
if ('\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, '\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
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()
);
}
$returnType = '\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation apiEshopOrderIdPostAsync
*
* Εισαγωγή / Τροποποίηση παραγγελίας
*
* @param int $order_id Ο αριθμός της παραγγελίας (required)
* @param \Europharmacy\EuromedicaClient\Model\EOrder|null $e_order (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopOrderIdPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEshopOrderIdPostAsync($order_id, $e_order = null, string $contentType = self::contentTypes['apiEshopOrderIdPost'][0])
{
return $this->apiEshopOrderIdPostAsyncWithHttpInfo($order_id, $e_order, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiEshopOrderIdPostAsyncWithHttpInfo
*
* Εισαγωγή / Τροποποίηση παραγγελίας
*
* @param int $order_id Ο αριθμός της παραγγελίας (required)
* @param \Europharmacy\EuromedicaClient\Model\EOrder|null $e_order (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopOrderIdPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEshopOrderIdPostAsyncWithHttpInfo($order_id, $e_order = null, string $contentType = self::contentTypes['apiEshopOrderIdPost'][0])
{
$returnType = '\Europharmacy\EuromedicaClient\Model\EOrderPagedResponse';
$request = $this->apiEshopOrderIdPostRequest($order_id, $e_order, $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 'apiEshopOrderIdPost'
*
* @param int $order_id Ο αριθμός της παραγγελίας (required)
* @param \Europharmacy\EuromedicaClient\Model\EOrder|null $e_order (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopOrderIdPost'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiEshopOrderIdPostRequest($order_id, $e_order = null, string $contentType = self::contentTypes['apiEshopOrderIdPost'][0])
{
// verify the required parameter 'order_id' is set
if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) {
throw new \InvalidArgumentException(
'Missing the required parameter $order_id when calling apiEshopOrderIdPost'
);
}
$resourcePath = '/api/Eshop/{orderId}';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// path params
if ($order_id !== null) {
$resourcePath = str_replace(
'{' . 'orderId' . '}',
ObjectSerializer::toPathValue($order_id),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(
['application/json', ],
$contentType,
$multipart
);
// for model (json/xml)
if (isset($e_order)) {
if (stripos($headers['Content-Type'], 'application/json') !== false) {
# if Content-Type contains "application/json", json_encode the body
$httpBody = \GuzzleHttp\Utils::jsonEncode(ObjectSerializer::sanitizeForSerialization($e_order));
} else {
$httpBody = $e_order;
}
} elseif (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 HTTP basic authentication
if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {
$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword());
}
$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 apiEshopStatusGet
*
* Κατάσταση παραγγελιών
*
* @param int|null $modified_last_days Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες (optional, default to 60)
* @param int|null $order_id Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων (optional, default to 0)
* @param \DateTime|null $modified_after Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays (optional)
* @param bool|null $include_creata_date By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $size (optional, default to 1000)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopStatusGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return \Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse|\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse
*/
public function apiEshopStatusGet($modified_last_days = 60, $order_id = 0, $modified_after = null, $include_creata_date = false, $page = 1, $size = 1000, string $contentType = self::contentTypes['apiEshopStatusGet'][0])
{
list($response) = $this->apiEshopStatusGetWithHttpInfo($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size, $contentType);
return $response;
}
/**
* Operation apiEshopStatusGetWithHttpInfo
*
* Κατάσταση παραγγελιών
*
* @param int|null $modified_last_days Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες (optional, default to 60)
* @param int|null $order_id Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων (optional, default to 0)
* @param \DateTime|null $modified_after Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays (optional)
* @param bool|null $include_creata_date By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $size (optional, default to 1000)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopStatusGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of \Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse|\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse, HTTP status code, HTTP response headers (array of strings)
*/
public function apiEshopStatusGetWithHttpInfo($modified_last_days = 60, $order_id = 0, $modified_after = null, $include_creata_date = false, $page = 1, $size = 1000, string $contentType = self::contentTypes['apiEshopStatusGet'][0])
{
$request = $this->apiEshopStatusGetRequest($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size, $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:
if ('\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, '\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
case 400:
if ('\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, '\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
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()
);
}
$returnType = '\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 400:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation apiEshopStatusGetAsync
*
* Κατάσταση παραγγελιών
*
* @param int|null $modified_last_days Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες (optional, default to 60)
* @param int|null $order_id Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων (optional, default to 0)
* @param \DateTime|null $modified_after Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays (optional)
* @param bool|null $include_creata_date By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $size (optional, default to 1000)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopStatusGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEshopStatusGetAsync($modified_last_days = 60, $order_id = 0, $modified_after = null, $include_creata_date = false, $page = 1, $size = 1000, string $contentType = self::contentTypes['apiEshopStatusGet'][0])
{
return $this->apiEshopStatusGetAsyncWithHttpInfo($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size, $contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiEshopStatusGetAsyncWithHttpInfo
*
* Κατάσταση παραγγελιών
*
* @param int|null $modified_last_days Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες (optional, default to 60)
* @param int|null $order_id Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων (optional, default to 0)
* @param \DateTime|null $modified_after Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays (optional)
* @param bool|null $include_creata_date By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $size (optional, default to 1000)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopStatusGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiEshopStatusGetAsyncWithHttpInfo($modified_last_days = 60, $order_id = 0, $modified_after = null, $include_creata_date = false, $page = 1, $size = 1000, string $contentType = self::contentTypes['apiEshopStatusGet'][0])
{
$returnType = '\Europharmacy\EuromedicaClient\Model\EOrderStatusPagedResponse';
$request = $this->apiEshopStatusGetRequest($modified_last_days, $order_id, $modified_after, $include_creata_date, $page, $size, $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 'apiEshopStatusGet'
*
* @param int|null $modified_last_days Εμφανίζει τις παραγγελίες που τροποποιήθηκαν τις τελευταίες {60 :default} μέρες (optional, default to 60)
* @param int|null $order_id Αν έχει τιμή &gt; 0 εμφανίζει κατάσταση της παραγγελίας ανεξαρτήτως των υπολοίπων παραμέτρων (optional, default to 0)
* @param \DateTime|null $modified_after Εμφανίζει τις παραγγελίες που τροποποιήθηκαν την επιλεγμένη ημερομηνία {null :default} αν έχει τιμή υπερισχύει της modifiedLastDays (optional)
* @param bool|null $include_creata_date By default δεν ελέγχει την ημερομηνία δημιουργίας για την εμφάνιση αποτελεσμάτων (optional, default to false)
* @param int|null $page (optional, default to 1)
* @param int|null $size (optional, default to 1000)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEshopStatusGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiEshopStatusGetRequest($modified_last_days = 60, $order_id = 0, $modified_after = null, $include_creata_date = false, $page = 1, $size = 1000, string $contentType = self::contentTypes['apiEshopStatusGet'][0])
{
if ($modified_last_days !== null && $modified_last_days > 360) {
throw new \InvalidArgumentException('invalid value for "$modified_last_days" when calling EshopApi.apiEshopStatusGet, must be smaller than or equal to 360.');
}
if ($modified_last_days !== null && $modified_last_days < 0) {
throw new \InvalidArgumentException('invalid value for "$modified_last_days" when calling EshopApi.apiEshopStatusGet, must be bigger than or equal to 0.');
}
if ($size !== null && $size > 1000) {
throw new \InvalidArgumentException('invalid value for "$size" when calling EshopApi.apiEshopStatusGet, must be smaller than or equal to 1000.');
}
if ($size !== null && $size < 1) {
throw new \InvalidArgumentException('invalid value for "$size" when calling EshopApi.apiEshopStatusGet, must be bigger than or equal to 1.');
}
$resourcePath = '/api/Eshop/Status';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$modified_last_days,
'modifiedLastDays', // param base name
'integer', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$order_id,
'orderId', // param base name
'integer', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$modified_after,
'modifiedAfter', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$include_creata_date,
'includeCreataDate', // param base name
'boolean', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$page,
'page', // param base name
'integer', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$size,
'size', // param base name
'integer', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
$headers = $this->headerSelector->selectHeaders(
['application/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 HTTP basic authentication
if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {
$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword());
}
$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
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}

2941
lib/Api/MasterDataApi.php Normal file

File diff suppressed because it is too large Load Diff

1589
lib/Api/ProductsApi.php Normal file

File diff suppressed because it is too large Load Diff

938
lib/Api/WelcomeApi.php Normal file
View File

@ -0,0 +1,938 @@
<?php
/**
* WelcomeApi
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Api;
use GuzzleHttp\Client;
use GuzzleHttp\ClientInterface;
use GuzzleHttp\Exception\ConnectException;
use GuzzleHttp\Exception\RequestException;
use GuzzleHttp\Psr7\MultipartStream;
use GuzzleHttp\Psr7\Request;
use GuzzleHttp\RequestOptions;
use Europharmacy\EuromedicaClient\ApiException;
use Europharmacy\EuromedicaClient\Configuration;
use Europharmacy\EuromedicaClient\HeaderSelector;
use Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* WelcomeApi Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class WelcomeApi
{
/**
* @var ClientInterface
*/
protected $client;
/**
* @var Configuration
*/
protected $config;
/**
* @var HeaderSelector
*/
protected $headerSelector;
/**
* @var int Host index
*/
protected $hostIndex;
/** @var string[] $contentTypes **/
public const contentTypes = [
'apiWelcomeGet' => [
'application/json',
],
'apiWelcomeHead' => [
'application/json',
],
'apiWelcomeSecureGet' => [
'application/json',
],
];
/**
* @param ClientInterface $client
* @param Configuration $config
* @param HeaderSelector $selector
* @param int $hostIndex (Optional) host index to select the list of hosts if defined in the OpenAPI spec
*/
public function __construct(
?ClientInterface $client = null,
?Configuration $config = null,
?HeaderSelector $selector = null,
int $hostIndex = 0
) {
$this->client = $client ?: new Client();
$this->config = $config ?: Configuration::getDefaultConfiguration();
$this->headerSelector = $selector ?: new HeaderSelector();
$this->hostIndex = $hostIndex;
}
/**
* Set the host index
*
* @param int $hostIndex Host index (required)
*/
public function setHostIndex($hostIndex): void
{
$this->hostIndex = $hostIndex;
}
/**
* Get the host index
*
* @return int Host index
*/
public function getHostIndex()
{
return $this->hostIndex;
}
/**
* @return Configuration
*/
public function getConfig()
{
return $this->config;
}
/**
* Operation apiWelcomeGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return string
*/
public function apiWelcomeGet(string $contentType = self::contentTypes['apiWelcomeGet'][0])
{
list($response) = $this->apiWelcomeGetWithHttpInfo($contentType);
return $response;
}
/**
* Operation apiWelcomeGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of string, HTTP status code, HTTP response headers (array of strings)
*/
public function apiWelcomeGetWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeGet'][0])
{
$request = $this->apiWelcomeGetRequest($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:
if ('string' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('string' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, 'string', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
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()
);
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation apiWelcomeGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeGetAsync(string $contentType = self::contentTypes['apiWelcomeGet'][0])
{
return $this->apiWelcomeGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiWelcomeGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeGet'][0])
{
$returnType = 'string';
$request = $this->apiWelcomeGetRequest($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 'apiWelcomeGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiWelcomeGetRequest(string $contentType = self::contentTypes['apiWelcomeGet'][0])
{
$resourcePath = '/api/Welcome';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['application/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);
}
}
$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 apiWelcomeHead
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeHead'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return void
*/
public function apiWelcomeHead(string $contentType = self::contentTypes['apiWelcomeHead'][0])
{
$this->apiWelcomeHeadWithHttpInfo($contentType);
}
/**
* Operation apiWelcomeHeadWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeHead'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\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 apiWelcomeHeadWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeHead'][0])
{
$request = $this->apiWelcomeHeadRequest($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 apiWelcomeHeadAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeHead'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeHeadAsync(string $contentType = self::contentTypes['apiWelcomeHead'][0])
{
return $this->apiWelcomeHeadAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiWelcomeHeadAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeHead'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeHeadAsyncWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeHead'][0])
{
$returnType = '';
$request = $this->apiWelcomeHeadRequest($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 'apiWelcomeHead'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeHead'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiWelcomeHeadRequest(string $contentType = self::contentTypes['apiWelcomeHead'][0])
{
$resourcePath = '/api/Welcome';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$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);
}
}
$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(
'HEAD',
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
$headers,
$httpBody
);
}
/**
* Operation apiWelcomeSecureGet
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeSecureGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return string|\Europharmacy\EuromedicaClient\Model\ProblemDetails
*/
public function apiWelcomeSecureGet(string $contentType = self::contentTypes['apiWelcomeSecureGet'][0])
{
list($response) = $this->apiWelcomeSecureGetWithHttpInfo($contentType);
return $response;
}
/**
* Operation apiWelcomeSecureGetWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeSecureGet'] to see the possible values for this operation
*
* @throws \Europharmacy\EuromedicaClient\ApiException on non-2xx response or if the response body is not in the expected format
* @throws \InvalidArgumentException
* @return array of string|\Europharmacy\EuromedicaClient\Model\ProblemDetails, HTTP status code, HTTP response headers (array of strings)
*/
public function apiWelcomeSecureGetWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeSecureGet'][0])
{
$request = $this->apiWelcomeSecureGetRequest($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:
if ('string' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('string' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, 'string', []),
$response->getStatusCode(),
$response->getHeaders()
];
case 401:
if ('\Europharmacy\EuromedicaClient\Model\ProblemDetails' === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ('\Europharmacy\EuromedicaClient\Model\ProblemDetails' !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, '\Europharmacy\EuromedicaClient\Model\ProblemDetails', []),
$response->getStatusCode(),
$response->getHeaders()
];
}
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()
);
}
$returnType = 'string';
if ($returnType === '\SplFileObject') {
$content = $response->getBody(); //stream goes to serializer
} else {
$content = (string) $response->getBody();
if ($returnType !== 'string') {
try {
$content = json_decode($content, false, 512, JSON_THROW_ON_ERROR);
} catch (\JsonException $exception) {
throw new ApiException(
sprintf(
'Error JSON decoding server response (%s)',
$request->getUri()
),
$statusCode,
$response->getHeaders(),
$content
);
}
}
}
return [
ObjectSerializer::deserialize($content, $returnType, []),
$response->getStatusCode(),
$response->getHeaders()
];
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'string',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
case 401:
$data = ObjectSerializer::deserialize(
$e->getResponseBody(),
'\Europharmacy\EuromedicaClient\Model\ProblemDetails',
$e->getResponseHeaders()
);
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* Operation apiWelcomeSecureGetAsync
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeSecureGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeSecureGetAsync(string $contentType = self::contentTypes['apiWelcomeSecureGet'][0])
{
return $this->apiWelcomeSecureGetAsyncWithHttpInfo($contentType)
->then(
function ($response) {
return $response[0];
}
);
}
/**
* Operation apiWelcomeSecureGetAsyncWithHttpInfo
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeSecureGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Promise\PromiseInterface
*/
public function apiWelcomeSecureGetAsyncWithHttpInfo(string $contentType = self::contentTypes['apiWelcomeSecureGet'][0])
{
$returnType = 'string';
$request = $this->apiWelcomeSecureGetRequest($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 'apiWelcomeSecureGet'
*
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiWelcomeSecureGet'] to see the possible values for this operation
*
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function apiWelcomeSecureGetRequest(string $contentType = self::contentTypes['apiWelcomeSecureGet'][0])
{
$resourcePath = '/api/Welcome/Secure';
$formParams = [];
$queryParams = [];
$headerParams = [];
$httpBody = '';
$multipart = false;
$headers = $this->headerSelector->selectHeaders(
['application/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 HTTP basic authentication
if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {
$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword());
}
$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
);
}
/**
* Create http client option
*
* @throws \RuntimeException on file opening failure
* @return array of http client options
*/
protected function createHttpClientOption()
{
$options = [];
if ($this->config->getDebug()) {
$options[RequestOptions::DEBUG] = fopen($this->config->getDebugFile(), 'a');
if (!$options[RequestOptions::DEBUG]) {
throw new \RuntimeException('Failed to open the debug file: ' . $this->config->getDebugFile());
}
}
return $options;
}
}

120
lib/ApiException.php Normal file
View File

@ -0,0 +1,120 @@
<?php
/**
* ApiException
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient;
use \Exception;
/**
* ApiException Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ApiException extends Exception
{
/**
* The HTTP body of the server response either as Json or string.
*
* @var \stdClass|string|null
*/
protected $responseBody;
/**
* The HTTP header of the server response.
*
* @var string[][]|null
*/
protected $responseHeaders;
/**
* The deserialized response object
*
* @var \stdClass|string|null
*/
protected $responseObject;
/**
* Constructor
*
* @param string $message Error message
* @param int $code HTTP status code
* @param string[][]|null $responseHeaders HTTP response header
* @param \stdClass|string|null $responseBody HTTP decoded body of the server response either as \stdClass or string
*/
public function __construct($message = "", $code = 0, $responseHeaders = [], $responseBody = null)
{
parent::__construct($message, $code);
$this->responseHeaders = $responseHeaders;
$this->responseBody = $responseBody;
}
/**
* Gets the HTTP response header
*
* @return string[][]|null HTTP response header
*/
public function getResponseHeaders()
{
return $this->responseHeaders;
}
/**
* Gets the HTTP body of the server response either as Json or string
*
* @return \stdClass|string|null HTTP body of the server response either as \stdClass or string
*/
public function getResponseBody()
{
return $this->responseBody;
}
/**
* Sets the deserialized response object (during deserialization)
*
* @param mixed $obj Deserialized response object
*
* @return void
*/
public function setResponseObject($obj)
{
$this->responseObject = $obj;
}
/**
* Gets the deserialized response object (during deserialization)
*
* @return mixed the deserialized response object
*/
public function getResponseObject()
{
return $this->responseObject;
}
}

532
lib/Configuration.php Normal file
View File

@ -0,0 +1,532 @@
<?php
/**
* Configuration
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient;
/**
* Configuration Class Doc Comment
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class Configuration
{
public const BOOLEAN_FORMAT_INT = 'int';
public const BOOLEAN_FORMAT_STRING = 'string';
/**
* @var Configuration
*/
private static $defaultConfiguration;
/**
* Associate array to store API key(s)
*
* @var string[]
*/
protected $apiKeys = [];
/**
* Associate array to store API prefix (e.g. Bearer)
*
* @var string[]
*/
protected $apiKeyPrefixes = [];
/**
* Access token for OAuth/Bearer authentication
*
* @var string
*/
protected $accessToken = '';
/**
* Boolean format for query string
*
* @var string
*/
protected $booleanFormatForQueryString = self::BOOLEAN_FORMAT_INT;
/**
* Username for HTTP basic authentication
*
* @var string
*/
protected $username = '';
/**
* Password for HTTP basic authentication
*
* @var string
*/
protected $password = '';
/**
* The host
*
* @var string
*/
protected $host = 'http://localhost';
/**
* User agent of the HTTP request, set to "OpenAPI-Generator/{version}/PHP" by default
*
* @var string
*/
protected $userAgent = 'OpenAPI-Generator/1.0.0/PHP';
/**
* Debug switch (default set to false)
*
* @var bool
*/
protected $debug = false;
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $debugFile = 'php://output';
/**
* Debug file location (log to STDOUT by default)
*
* @var string
*/
protected $tempFolderPath;
/**
* Constructor
*/
public function __construct()
{
$this->tempFolderPath = sys_get_temp_dir();
}
/**
* Sets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $key API key or token
*
* @return $this
*/
public function setApiKey($apiKeyIdentifier, $key)
{
$this->apiKeys[$apiKeyIdentifier] = $key;
return $this;
}
/**
* Gets API key
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return null|string API key or token
*/
public function getApiKey($apiKeyIdentifier)
{
return isset($this->apiKeys[$apiKeyIdentifier]) ? $this->apiKeys[$apiKeyIdentifier] : null;
}
/**
* Sets the prefix for API key (e.g. Bearer)
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
* @param string $prefix API key prefix, e.g. Bearer
*
* @return $this
*/
public function setApiKeyPrefix($apiKeyIdentifier, $prefix)
{
$this->apiKeyPrefixes[$apiKeyIdentifier] = $prefix;
return $this;
}
/**
* Gets API key prefix
*
* @param string $apiKeyIdentifier API key identifier (authentication scheme)
*
* @return null|string
*/
public function getApiKeyPrefix($apiKeyIdentifier)
{
return isset($this->apiKeyPrefixes[$apiKeyIdentifier]) ? $this->apiKeyPrefixes[$apiKeyIdentifier] : null;
}
/**
* Sets the access token for OAuth
*
* @param string $accessToken Token for OAuth
*
* @return $this
*/
public function setAccessToken($accessToken)
{
$this->accessToken = $accessToken;
return $this;
}
/**
* Gets the access token for OAuth
*
* @return string Access token for OAuth
*/
public function getAccessToken()
{
return $this->accessToken;
}
/**
* Sets boolean format for query string.
*
* @param string $booleanFormat Boolean format for query string
*
* @return $this
*/
public function setBooleanFormatForQueryString(string $booleanFormat)
{
$this->booleanFormatForQueryString = $booleanFormat;
return $this;
}
/**
* Gets boolean format for query string.
*
* @return string Boolean format for query string
*/
public function getBooleanFormatForQueryString(): string
{
return $this->booleanFormatForQueryString;
}
/**
* Sets the username for HTTP basic authentication
*
* @param string $username Username for HTTP basic authentication
*
* @return $this
*/
public function setUsername($username)
{
$this->username = $username;
return $this;
}
/**
* Gets the username for HTTP basic authentication
*
* @return string Username for HTTP basic authentication
*/
public function getUsername()
{
return $this->username;
}
/**
* Sets the password for HTTP basic authentication
*
* @param string $password Password for HTTP basic authentication
*
* @return $this
*/
public function setPassword($password)
{
$this->password = $password;
return $this;
}
/**
* Gets the password for HTTP basic authentication
*
* @return string Password for HTTP basic authentication
*/
public function getPassword()
{
return $this->password;
}
/**
* Sets the host
*
* @param string $host Host
*
* @return $this
*/
public function setHost($host)
{
$this->host = $host;
return $this;
}
/**
* Gets the host
*
* @return string Host
*/
public function getHost()
{
return $this->host;
}
/**
* Sets the user agent of the api client
*
* @param string $userAgent the user agent of the api client
*
* @throws \InvalidArgumentException
* @return $this
*/
public function setUserAgent($userAgent)
{
if (!is_string($userAgent)) {
throw new \InvalidArgumentException('User-agent must be a string.');
}
$this->userAgent = $userAgent;
return $this;
}
/**
* Gets the user agent of the api client
*
* @return string user agent
*/
public function getUserAgent()
{
return $this->userAgent;
}
/**
* Sets debug flag
*
* @param bool $debug Debug flag
*
* @return $this
*/
public function setDebug($debug)
{
$this->debug = $debug;
return $this;
}
/**
* Gets the debug flag
*
* @return bool
*/
public function getDebug()
{
return $this->debug;
}
/**
* Sets the debug file
*
* @param string $debugFile Debug file
*
* @return $this
*/
public function setDebugFile($debugFile)
{
$this->debugFile = $debugFile;
return $this;
}
/**
* Gets the debug file
*
* @return string
*/
public function getDebugFile()
{
return $this->debugFile;
}
/**
* Sets the temp folder path
*
* @param string $tempFolderPath Temp folder path
*
* @return $this
*/
public function setTempFolderPath($tempFolderPath)
{
$this->tempFolderPath = $tempFolderPath;
return $this;
}
/**
* Gets the temp folder path
*
* @return string Temp folder path
*/
public function getTempFolderPath()
{
return $this->tempFolderPath;
}
/**
* Gets the default configuration instance
*
* @return Configuration
*/
public static function getDefaultConfiguration()
{
if (self::$defaultConfiguration === null) {
self::$defaultConfiguration = new Configuration();
}
return self::$defaultConfiguration;
}
/**
* Sets the default configuration instance
*
* @param Configuration $config An instance of the Configuration Object
*
* @return void
*/
public static function setDefaultConfiguration(Configuration $config)
{
self::$defaultConfiguration = $config;
}
/**
* Gets the essential information for debugging
*
* @return string The report for debugging
*/
public static function toDebugReport()
{
$report = 'PHP SDK (Europharmacy\EuromedicaClient) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
$report .= ' The version of the OpenAPI document: v1' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
return $report;
}
/**
* Get API key (with prefix if set)
*
* @param string $apiKeyIdentifier name of apikey
*
* @return null|string API key with the prefix
*/
public function getApiKeyWithPrefix($apiKeyIdentifier)
{
$prefix = $this->getApiKeyPrefix($apiKeyIdentifier);
$apiKey = $this->getApiKey($apiKeyIdentifier);
if ($apiKey === null) {
return null;
}
if ($prefix === null) {
$keyWithPrefix = $apiKey;
} else {
$keyWithPrefix = $prefix . ' ' . $apiKey;
}
return $keyWithPrefix;
}
/**
* Returns an array of host settings
*
* @return array an array of host settings
*/
public function getHostSettings()
{
return [
[
"url" => "",
"description" => "No description provided",
]
];
}
/**
* Returns URL based on host settings, index and variables
*
* @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients
* @param int $hostIndex index of the host settings
* @param array|null $variables hash of variable and the corresponding value (optional)
* @return string URL based on host settings
*/
public static function getHostString(array $hostSettings, $hostIndex, ?array $variables = null)
{
if (null === $variables) {
$variables = [];
}
// check array index out of bound
if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) {
throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings));
}
$host = $hostSettings[$hostIndex];
$url = $host["url"];
// go through variable and assign a value
foreach ($host["variables"] ?? [] as $name => $variable) {
if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user
if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum
$url = str_replace("{".$name."}", $variables[$name], $url);
} else {
throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"]).".");
}
} else {
// use default value
$url = str_replace("{".$name."}", $variable["default_value"], $url);
}
}
return $url;
}
/**
* Returns URL based on the index and variables
*
* @param int $index index of the host settings
* @param array|null $variables hash of variable and the corresponding value (optional)
* @return string URL based on host settings
*/
public function getHostFromSettings($index, $variables = null)
{
return self::getHostString($this->getHostSettings(), $index, $variables);
}
}

274
lib/HeaderSelector.php Normal file
View File

@ -0,0 +1,274 @@
<?php
/**
* HeaderSelector
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient;
/**
* HeaderSelector Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class HeaderSelector
{
/**
* @param string[] $accept
* @param string $contentType
* @param bool $isMultipart
* @return string[]
*/
public function selectHeaders(array $accept, string $contentType, bool $isMultipart): array
{
$headers = [];
$accept = $this->selectAcceptHeader($accept);
if ($accept !== null) {
$headers['Accept'] = $accept;
}
if (!$isMultipart) {
if($contentType === '') {
$contentType = 'application/json';
}
$headers['Content-Type'] = $contentType;
}
return $headers;
}
/**
* Return the header 'Accept' based on an array of Accept provided.
*
* @param string[] $accept Array of header
*
* @return null|string Accept (e.g. application/json)
*/
private function selectAcceptHeader(array $accept): ?string
{
# filter out empty entries
$accept = array_filter($accept);
if (count($accept) === 0) {
return null;
}
# If there's only one Accept header, just use it
if (count($accept) === 1) {
return reset($accept);
}
# If none of the available Accept headers is of type "json", then just use all them
$headersWithJson = $this->selectJsonMimeList($accept);
if (count($headersWithJson) === 0) {
return implode(',', $accept);
}
# If we got here, then we need add quality values (weight), as described in IETF RFC 9110, Items 12.4.2/12.5.1,
# to give the highest priority to json-like headers - recalculating the existing ones, if needed
return $this->getAcceptHeaderWithAdjustedWeight($accept, $headersWithJson);
}
/**
* Detects whether a string contains a valid JSON mime type
*
* @param string $searchString
* @return bool
*/
public function isJsonMime(string $searchString): bool
{
return preg_match('~^application/(json|[\w!#$&.+-^_]+\+json)\s*(;|$)~', $searchString) === 1;
}
/**
* Select all items from a list containing a JSON mime type
*
* @param array $mimeList
* @return array
*/
private function selectJsonMimeList(array $mimeList): array {
$jsonMimeList = [];
foreach ($mimeList as $mime) {
if($this->isJsonMime($mime)) {
$jsonMimeList[] = $mime;
}
}
return $jsonMimeList;
}
/**
* Create an Accept header string from the given "Accept" headers array, recalculating all weights
*
* @param string[] $accept Array of Accept Headers
* @param string[] $headersWithJson Array of Accept Headers of type "json"
*
* @return string "Accept" Header (e.g. "application/json, text/html; q=0.9")
*/
private function getAcceptHeaderWithAdjustedWeight(array $accept, array $headersWithJson): string
{
$processedHeaders = [
'withApplicationJson' => [],
'withJson' => [],
'withoutJson' => [],
];
foreach ($accept as $header) {
$headerData = $this->getHeaderAndWeight($header);
if (stripos($headerData['header'], 'application/json') === 0) {
$processedHeaders['withApplicationJson'][] = $headerData;
} elseif (in_array($header, $headersWithJson, true)) {
$processedHeaders['withJson'][] = $headerData;
} else {
$processedHeaders['withoutJson'][] = $headerData;
}
}
$acceptHeaders = [];
$currentWeight = 1000;
$hasMoreThan28Headers = count($accept) > 28;
foreach($processedHeaders as $headers) {
if (count($headers) > 0) {
$acceptHeaders[] = $this->adjustWeight($headers, $currentWeight, $hasMoreThan28Headers);
}
}
$acceptHeaders = array_merge(...$acceptHeaders);
return implode(',', $acceptHeaders);
}
/**
* Given an Accept header, returns an associative array splitting the header and its weight
*
* @param string $header "Accept" Header
*
* @return array with the header and its weight
*/
private function getHeaderAndWeight(string $header): array
{
# matches headers with weight, splitting the header and the weight in $outputArray
if (preg_match('/(.*);\s*q=(1(?:\.0+)?|0\.\d+)$/', $header, $outputArray) === 1) {
$headerData = [
'header' => $outputArray[1],
'weight' => (int)($outputArray[2] * 1000),
];
} else {
$headerData = [
'header' => trim($header),
'weight' => 1000,
];
}
return $headerData;
}
/**
* @param array[] $headers
* @param float $currentWeight
* @param bool $hasMoreThan28Headers
* @return string[] array of adjusted "Accept" headers
*/
private function adjustWeight(array $headers, float &$currentWeight, bool $hasMoreThan28Headers): array
{
usort($headers, function (array $a, array $b) {
return $b['weight'] - $a['weight'];
});
$acceptHeaders = [];
foreach ($headers as $index => $header) {
if($index > 0 && $headers[$index - 1]['weight'] > $header['weight'])
{
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
}
$weight = $currentWeight;
$acceptHeaders[] = $this->buildAcceptHeader($header['header'], $weight);
}
$currentWeight = $this->getNextWeight($currentWeight, $hasMoreThan28Headers);
return $acceptHeaders;
}
/**
* @param string $header
* @param int $weight
* @return string
*/
private function buildAcceptHeader(string $header, int $weight): string
{
if($weight === 1000) {
return $header;
}
return trim($header, '; ') . ';q=' . rtrim(sprintf('%0.3f', $weight / 1000), '0');
}
/**
* Calculate the next weight, based on the current one.
*
* If there are less than 28 "Accept" headers, the weights will be decreased by 1 on its highest significant digit, using the
* following formula:
*
* next weight = current weight - 10 ^ (floor(log(current weight - 1)))
*
* ( current weight minus ( 10 raised to the power of ( floor of (log to the base 10 of ( current weight minus 1 ) ) ) ) )
*
* Starting from 1000, this generates the following series:
*
* 1000, 900, 800, 700, 600, 500, 400, 300, 200, 100, 90, 80, 70, 60, 50, 40, 30, 20, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1
*
* The resulting quality codes are closer to the average "normal" usage of them (like "q=0.9", "q=0.8" and so on), but it only works
* if there is a maximum of 28 "Accept" headers. If we have more than that (which is extremely unlikely), then we fall back to a 1-by-1
* decrement rule, which will result in quality codes like "q=0.999", "q=0.998" etc.
*
* @param int $currentWeight varying from 1 to 1000 (will be divided by 1000 to build the quality value)
* @param bool $hasMoreThan28Headers
* @return int
*/
public function getNextWeight(int $currentWeight, bool $hasMoreThan28Headers): int
{
if ($currentWeight <= 1) {
return 1;
}
if ($hasMoreThan28Headers) {
return $currentWeight - 1;
}
return $currentWeight - 10 ** floor( log10($currentWeight - 1) );
}
}

1167
lib/Model/Billing.php Normal file

File diff suppressed because it is too large Load Diff

458
lib/Model/CategoryDto.php Normal file
View File

@ -0,0 +1,458 @@
<?php
/**
* CategoryDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* CategoryDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CategoryDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CategoryDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'categ_id' => 'string',
'categ_desc' => '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 = [
'categ_id' => null,
'categ_desc' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'categ_id' => true,
'categ_desc' => 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 = [
'categ_id' => 'categId',
'categ_desc' => 'categDesc'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'categ_id' => 'setCategId',
'categ_desc' => 'setCategDesc'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'categ_id' => 'getCategId',
'categ_desc' => 'getCategDesc'
];
/**
* 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('categ_id', $data ?? [], null);
$this->setIfExists('categ_desc', $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 categ_id
*
* @return string|null
*/
public function getCategId()
{
return $this->container['categ_id'];
}
/**
* Sets categ_id
*
* @param string|null $categ_id categ_id
*
* @return self
*/
public function setCategId($categ_id)
{
if (is_null($categ_id)) {
array_push($this->openAPINullablesSetToNull, 'categ_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('categ_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['categ_id'] = $categ_id;
return $this;
}
/**
* Gets categ_desc
*
* @return string|null
*/
public function getCategDesc()
{
return $this->container['categ_desc'];
}
/**
* Sets categ_desc
*
* @param string|null $categ_desc categ_desc
*
* @return self
*/
public function setCategDesc($categ_desc)
{
if (is_null($categ_desc)) {
array_push($this->openAPINullablesSetToNull, 'categ_desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('categ_desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['categ_desc'] = $categ_desc;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* CategoryDtoListPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* CategoryDtoListPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CategoryDtoListPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CategoryDtoListPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\CategoryDto[][]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\CategoryDto[][]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\CategoryDto[][]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

451
lib/Model/Coupon.php Normal file
View File

@ -0,0 +1,451 @@
<?php
/**
* Coupon
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Coupon Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Coupon implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'coupon';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'code' => 'string',
'amount' => '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 = [
'code' => null,
'amount' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'code' => true,
'amount' => 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 = [
'code' => 'code',
'amount' => 'amount'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'code' => 'setCode',
'amount' => 'setAmount'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'code' => 'getCode',
'amount' => 'getAmount'
];
/**
* 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('code', $data ?? [], null);
$this->setIfExists('amount', $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 code
*
* @return string|null
*/
public function getCode()
{
return $this->container['code'];
}
/**
* Sets code
*
* @param string|null $code προαιρετικό πεδίο , όνομα κουπονιού
*
* @return self
*/
public function setCode($code)
{
if (is_null($code)) {
array_push($this->openAPINullablesSetToNull, 'code');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('code', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['code'] = $code;
return $this;
}
/**
* Gets amount
*
* @return float|null
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param float|null $amount αξία κουπονιού
*
* @return self
*/
public function setAmount($amount)
{
if (is_null($amount)) {
throw new \InvalidArgumentException('non-nullable amount cannot be null');
}
$this->container['amount'] = $amount;
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));
}
}

418
lib/Model/Coupons.php Normal file
View File

@ -0,0 +1,418 @@
<?php
/**
* Coupons
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Coupons Class Doc Comment
*
* @category Class
* @description Τα κουπόνια είναι αξιακά και όχι ποσοστιαία . Σε περίπτωση που δεν υπάρχουν να παραλείπεται
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Coupons implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'coupons';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'coupon_list' => '\Europharmacy\EuromedicaClient\Model\Coupon[]'
];
/**
* 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 = [
'coupon_list' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'coupon_list' => 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 = [
'coupon_list' => 'couponList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'coupon_list' => 'setCouponList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'coupon_list' => 'getCouponList'
];
/**
* 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('coupon_list', $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 coupon_list
*
* @return \Europharmacy\EuromedicaClient\Model\Coupon[]|null
*/
public function getCouponList()
{
return $this->container['coupon_list'];
}
/**
* Sets coupon_list
*
* @param \Europharmacy\EuromedicaClient\Model\Coupon[]|null $coupon_list coupon_list
*
* @return self
*/
public function setCouponList($coupon_list)
{
if (is_null($coupon_list)) {
array_push($this->openAPINullablesSetToNull, 'coupon_list');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('coupon_list', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['coupon_list'] = $coupon_list;
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));
}
}

1257
lib/Model/Customer.php Normal file

File diff suppressed because it is too large Load Diff

1295
lib/Model/CustomerDto.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,730 @@
<?php
/**
* CustomerPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* CustomerPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class CustomerPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'CustomerPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\Customer[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\Customer[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\Customer[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

1192
lib/Model/EOrder.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,730 @@
<?php
/**
* EOrderPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* EOrderPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class EOrderPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'EOrderPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\EOrder[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\EOrder[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\EOrder[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

683
lib/Model/EOrderStatus.php Normal file
View File

@ -0,0 +1,683 @@
<?php
/**
* EOrderStatus
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* EOrderStatus Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class EOrderStatus implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'EOrderStatus';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'order_id' => 'int',
'status_id' => 'int',
'status' => 'string',
'date_created' => '\DateTime',
'date_completed' => '\DateTime',
'date_modified' => '\DateTime',
'date_paid' => '\DateTime',
'qr_url' => '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 = [
'order_id' => 'int32',
'status_id' => 'int32',
'status' => null,
'date_created' => 'date-time',
'date_completed' => 'date-time',
'date_modified' => 'date-time',
'date_paid' => 'date-time',
'qr_url' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'order_id' => false,
'status_id' => false,
'status' => true,
'date_created' => false,
'date_completed' => true,
'date_modified' => true,
'date_paid' => true,
'qr_url' => 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 = [
'order_id' => 'orderId',
'status_id' => 'statusId',
'status' => 'status',
'date_created' => 'dateCreated',
'date_completed' => 'dateCompleted',
'date_modified' => 'dateModified',
'date_paid' => 'datePaid',
'qr_url' => 'qrUrl'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'order_id' => 'setOrderId',
'status_id' => 'setStatusId',
'status' => 'setStatus',
'date_created' => 'setDateCreated',
'date_completed' => 'setDateCompleted',
'date_modified' => 'setDateModified',
'date_paid' => 'setDatePaid',
'qr_url' => 'setQrUrl'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'order_id' => 'getOrderId',
'status_id' => 'getStatusId',
'status' => 'getStatus',
'date_created' => 'getDateCreated',
'date_completed' => 'getDateCompleted',
'date_modified' => 'getDateModified',
'date_paid' => 'getDatePaid',
'qr_url' => 'getQrUrl'
];
/**
* 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('order_id', $data ?? [], null);
$this->setIfExists('status_id', $data ?? [], null);
$this->setIfExists('status', $data ?? [], null);
$this->setIfExists('date_created', $data ?? [], null);
$this->setIfExists('date_completed', $data ?? [], null);
$this->setIfExists('date_modified', $data ?? [], null);
$this->setIfExists('date_paid', $data ?? [], null);
$this->setIfExists('qr_url', $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 order_id
*
* @return int|null
*/
public function getOrderId()
{
return $this->container['order_id'];
}
/**
* Sets order_id
*
* @param int|null $order_id order_id
*
* @return self
*/
public function setOrderId($order_id)
{
if (is_null($order_id)) {
throw new \InvalidArgumentException('non-nullable order_id cannot be null');
}
$this->container['order_id'] = $order_id;
return $this;
}
/**
* Gets status_id
*
* @return int|null
*/
public function getStatusId()
{
return $this->container['status_id'];
}
/**
* Sets status_id
*
* @param int|null $status_id status_id
*
* @return self
*/
public function setStatusId($status_id)
{
if (is_null($status_id)) {
throw new \InvalidArgumentException('non-nullable status_id cannot be null');
}
$this->container['status_id'] = $status_id;
return $this;
}
/**
* Gets status
*
* @return string|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param string|null $status status
*
* @return self
*/
public function setStatus($status)
{
if (is_null($status)) {
array_push($this->openAPINullablesSetToNull, 'status');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('status', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets date_created
*
* @return \DateTime|null
*/
public function getDateCreated()
{
return $this->container['date_created'];
}
/**
* Sets date_created
*
* @param \DateTime|null $date_created date_created
*
* @return self
*/
public function setDateCreated($date_created)
{
if (is_null($date_created)) {
throw new \InvalidArgumentException('non-nullable date_created cannot be null');
}
$this->container['date_created'] = $date_created;
return $this;
}
/**
* Gets date_completed
*
* @return \DateTime|null
*/
public function getDateCompleted()
{
return $this->container['date_completed'];
}
/**
* Sets date_completed
*
* @param \DateTime|null $date_completed Συμπληρώνεται από το erp όταν ολοκληρωθεί η παραγγελία
*
* @return self
*/
public function setDateCompleted($date_completed)
{
if (is_null($date_completed)) {
array_push($this->openAPINullablesSetToNull, 'date_completed');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('date_completed', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['date_completed'] = $date_completed;
return $this;
}
/**
* Gets date_modified
*
* @return \DateTime|null
*/
public function getDateModified()
{
return $this->container['date_modified'];
}
/**
* Sets date_modified
*
* @param \DateTime|null $date_modified Συμπληρώνεται από το erp όταν τροποποιηθεί η παραγγελία
*
* @return self
*/
public function setDateModified($date_modified)
{
if (is_null($date_modified)) {
array_push($this->openAPINullablesSetToNull, 'date_modified');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('date_modified', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['date_modified'] = $date_modified;
return $this;
}
/**
* Gets date_paid
*
* @return \DateTime|null
*/
public function getDatePaid()
{
return $this->container['date_paid'];
}
/**
* Sets date_paid
*
* @param \DateTime|null $date_paid Συμπληρώνεται από το eshop όταν γίνει πληρωμή με κάρτα
*
* @return self
*/
public function setDatePaid($date_paid)
{
if (is_null($date_paid)) {
array_push($this->openAPINullablesSetToNull, 'date_paid');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('date_paid', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['date_paid'] = $date_paid;
return $this;
}
/**
* Gets qr_url
*
* @return string|null
*/
public function getQrUrl()
{
return $this->container['qr_url'];
}
/**
* Sets qr_url
*
* @param string|null $qr_url Συμπληρώνεται από το erp όταν έχει εκδοθεί απόδειξη από πάροχο
*
* @return self
*/
public function setQrUrl($qr_url)
{
if (is_null($qr_url)) {
array_push($this->openAPINullablesSetToNull, 'qr_url');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('qr_url', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['qr_url'] = $qr_url;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* EOrderStatusPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* EOrderStatusPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class EOrderStatusPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'EOrderStatusPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\EOrderStatus[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\EOrderStatus[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\EOrderStatus[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

583
lib/Model/Fee.php Normal file
View File

@ -0,0 +1,583 @@
<?php
/**
* Fee
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Fee Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Fee implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'fee';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'fee_id' => 'int',
'fee_name' => 'string',
'amount' => 'float',
'vat_amount' => 'float',
'total' => '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 = [
'fee_id' => 'int32',
'fee_name' => null,
'amount' => 'double',
'vat_amount' => 'double',
'total' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'fee_id' => false,
'fee_name' => true,
'amount' => true,
'vat_amount' => true,
'total' => 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 = [
'fee_id' => 'fee_id',
'fee_name' => 'feeName',
'amount' => 'amount',
'vat_amount' => 'vatAmount',
'total' => 'total'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'fee_id' => 'setFeeId',
'fee_name' => 'setFeeName',
'amount' => 'setAmount',
'vat_amount' => 'setVatAmount',
'total' => 'setTotal'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'fee_id' => 'getFeeId',
'fee_name' => 'getFeeName',
'amount' => 'getAmount',
'vat_amount' => 'getVatAmount',
'total' => 'getTotal'
];
/**
* 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('fee_id', $data ?? [], null);
$this->setIfExists('fee_name', $data ?? [], null);
$this->setIfExists('amount', $data ?? [], null);
$this->setIfExists('vat_amount', $data ?? [], null);
$this->setIfExists('total', $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 = [];
if (!is_null($this->container['fee_id']) && ($this->container['fee_id'] > 3)) {
$invalidProperties[] = "invalid value for 'fee_id', must be smaller than or equal to 3.";
}
if (!is_null($this->container['fee_id']) && ($this->container['fee_id'] < 1)) {
$invalidProperties[] = "invalid value for 'fee_id', must be bigger than or equal to 1.";
}
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 fee_id
*
* @return int|null
*/
public function getFeeId()
{
return $this->container['fee_id'];
}
/**
* Sets fee_id
*
* @param int|null $fee_id { \"1\" ,ΕΞΟΔΑ ΑΝΤΙΚΑΤΑΒΟΛΗΣ } { \"2\" ,ΕΞΟΔΑ ΑΠΟΣΤΟΛΗΣ } { \"3\" ,ΕΞΟΔΑ ΣΥΣΚΕΥΑΣΙΑΣ }
*
* @return self
*/
public function setFeeId($fee_id)
{
if (is_null($fee_id)) {
throw new \InvalidArgumentException('non-nullable fee_id cannot be null');
}
if (($fee_id > 3)) {
throw new \InvalidArgumentException('invalid value for $fee_id when calling Fee., must be smaller than or equal to 3.');
}
if (($fee_id < 1)) {
throw new \InvalidArgumentException('invalid value for $fee_id when calling Fee., must be bigger than or equal to 1.');
}
$this->container['fee_id'] = $fee_id;
return $this;
}
/**
* Gets fee_name
*
* @return string|null
*/
public function getFeeName()
{
return $this->container['fee_name'];
}
/**
* Sets fee_name
*
* @param string|null $fee_name fee_name
*
* @return self
*/
public function setFeeName($fee_name)
{
if (is_null($fee_name)) {
array_push($this->openAPINullablesSetToNull, 'fee_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('fee_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['fee_name'] = $fee_name;
return $this;
}
/**
* Gets amount
*
* @return float|null
*/
public function getAmount()
{
return $this->container['amount'];
}
/**
* Sets amount
*
* @param float|null $amount amount
*
* @return self
*/
public function setAmount($amount)
{
if (is_null($amount)) {
array_push($this->openAPINullablesSetToNull, 'amount');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('amount', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['amount'] = $amount;
return $this;
}
/**
* Gets vat_amount
*
* @return float|null
*/
public function getVatAmount()
{
return $this->container['vat_amount'];
}
/**
* Sets vat_amount
*
* @param float|null $vat_amount vat_amount
*
* @return self
*/
public function setVatAmount($vat_amount)
{
if (is_null($vat_amount)) {
array_push($this->openAPINullablesSetToNull, 'vat_amount');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('vat_amount', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['vat_amount'] = $vat_amount;
return $this;
}
/**
* Gets total
*
* @return float|null
*/
public function getTotal()
{
return $this->container['total'];
}
/**
* Sets total
*
* @param float|null $total
*
* @return self
*/
public function setTotal($total)
{
if (is_null($total)) {
throw new \InvalidArgumentException('non-nullable total cannot be null');
}
$this->container['total'] = $total;
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));
}
}

418
lib/Model/Fees.php Normal file
View File

@ -0,0 +1,418 @@
<?php
/**
* Fees
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Fees Class Doc Comment
*
* @category Class
* @description ΠΡΟΣΘΕΤΕΣ ΧΡΕΩΣΕΙΣ , σε περίπτωση που δεν υπάρχουν να παραλείπεται
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Fees implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'fees';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'fee_list' => '\Europharmacy\EuromedicaClient\Model\Fee[]'
];
/**
* 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 = [
'fee_list' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'fee_list' => 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 = [
'fee_list' => 'feeList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'fee_list' => 'setFeeList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'fee_list' => 'getFeeList'
];
/**
* 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('fee_list', $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 fee_list
*
* @return \Europharmacy\EuromedicaClient\Model\Fee[]|null
*/
public function getFeeList()
{
return $this->container['fee_list'];
}
/**
* Sets fee_list
*
* @param \Europharmacy\EuromedicaClient\Model\Fee[]|null $fee_list fee_list
*
* @return self
*/
public function setFeeList($fee_list)
{
if (is_null($fee_list)) {
array_push($this->openAPINullablesSetToNull, 'fee_list');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('fee_list', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['fee_list'] = $fee_list;
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));
}
}

636
lib/Model/Item.php Normal file
View File

@ -0,0 +1,636 @@
<?php
/**
* Item
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Item Class Doc Comment
*
* @category Class
* @description Η αναγνώριση του είδους γίνεται είτε από erpId είτε με barcode. Συνιστάται erpId
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Item implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'item';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'product_title' => 'string',
'erp_id' => 'string',
'barcode' => 'string',
'qty' => 'float',
'unit_price' => 'float',
'discount_percentage' => 'float',
'total' => '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 = [
'product_title' => null,
'erp_id' => null,
'barcode' => null,
'qty' => 'double',
'unit_price' => 'double',
'discount_percentage' => 'double',
'total' => 'double'
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'product_title' => true,
'erp_id' => true,
'barcode' => true,
'qty' => false,
'unit_price' => false,
'discount_percentage' => false,
'total' => 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 = [
'product_title' => 'productTitle',
'erp_id' => 'erpId',
'barcode' => 'barcode',
'qty' => 'qty',
'unit_price' => 'unitPrice',
'discount_percentage' => 'discountPercentage',
'total' => 'total'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'product_title' => 'setProductTitle',
'erp_id' => 'setErpId',
'barcode' => 'setBarcode',
'qty' => 'setQty',
'unit_price' => 'setUnitPrice',
'discount_percentage' => 'setDiscountPercentage',
'total' => 'setTotal'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'product_title' => 'getProductTitle',
'erp_id' => 'getErpId',
'barcode' => 'getBarcode',
'qty' => 'getQty',
'unit_price' => 'getUnitPrice',
'discount_percentage' => 'getDiscountPercentage',
'total' => 'getTotal'
];
/**
* 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('product_title', $data ?? [], null);
$this->setIfExists('erp_id', $data ?? [], null);
$this->setIfExists('barcode', $data ?? [], null);
$this->setIfExists('qty', $data ?? [], null);
$this->setIfExists('unit_price', $data ?? [], null);
$this->setIfExists('discount_percentage', $data ?? [], null);
$this->setIfExists('total', $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 product_title
*
* @return string|null
*/
public function getProductTitle()
{
return $this->container['product_title'];
}
/**
* Sets product_title
*
* @param string|null $product_title όνομα προϊόντος
*
* @return self
*/
public function setProductTitle($product_title)
{
if (is_null($product_title)) {
array_push($this->openAPINullablesSetToNull, 'product_title');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('product_title', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['product_title'] = $product_title;
return $this;
}
/**
* Gets erp_id
*
* @return string|null
*/
public function getErpId()
{
return $this->container['erp_id'];
}
/**
* Sets erp_id
*
* @param string|null $erp_id to uniqId του Product
*
* @return self
*/
public function setErpId($erp_id)
{
if (is_null($erp_id)) {
array_push($this->openAPINullablesSetToNull, 'erp_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('erp_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['erp_id'] = $erp_id;
return $this;
}
/**
* Gets barcode
*
* @return string|null
*/
public function getBarcode()
{
return $this->container['barcode'];
}
/**
* Sets barcode
*
* @param string|null $barcode barcode προϊόντος μόνο ένα σε περίπτωση που υπάρχουν περισσότερα του ενός
*
* @return self
*/
public function setBarcode($barcode)
{
if (is_null($barcode)) {
array_push($this->openAPINullablesSetToNull, 'barcode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('barcode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['barcode'] = $barcode;
return $this;
}
/**
* Gets qty
*
* @return float|null
*/
public function getQty()
{
return $this->container['qty'];
}
/**
* Sets qty
*
* @param float|null $qty qty
*
* @return self
*/
public function setQty($qty)
{
if (is_null($qty)) {
throw new \InvalidArgumentException('non-nullable qty cannot be null');
}
$this->container['qty'] = $qty;
return $this;
}
/**
* Gets unit_price
*
* @return float|null
*/
public function getUnitPrice()
{
return $this->container['unit_price'];
}
/**
* Sets unit_price
*
* @param float|null $unit_price λιανική τιμή προ έκπτωσης
*
* @return self
*/
public function setUnitPrice($unit_price)
{
if (is_null($unit_price)) {
throw new \InvalidArgumentException('non-nullable unit_price cannot be null');
}
$this->container['unit_price'] = $unit_price;
return $this;
}
/**
* Gets discount_percentage
*
* @return float|null
*/
public function getDiscountPercentage()
{
return $this->container['discount_percentage'];
}
/**
* Sets discount_percentage
*
* @param float|null $discount_percentage ποσοστιαία έκπτωση
*
* @return self
*/
public function setDiscountPercentage($discount_percentage)
{
if (is_null($discount_percentage)) {
throw new \InvalidArgumentException('non-nullable discount_percentage cannot be null');
}
$this->container['discount_percentage'] = $discount_percentage;
return $this;
}
/**
* Gets total
*
* @return float|null
*/
public function getTotal()
{
return $this->container['total'];
}
/**
* Sets total
*
* @param float|null $total Συνολική αξία προϊόντων μετά την έκπτωση (qty * unitPrice * ((100 - discountPercentage)/100))
*
* @return self
*/
public function setTotal($total)
{
if (is_null($total)) {
throw new \InvalidArgumentException('non-nullable total cannot be null');
}
$this->container['total'] = $total;
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));
}
}

418
lib/Model/Items.php Normal file
View File

@ -0,0 +1,418 @@
<?php
/**
* Items
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Items Class Doc Comment
*
* @category Class
* @description Προϊόντα παραγγελίας - δεν περιλαμβάνονται πρόσθετες χρεώσεις και κουπόνια
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Items implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'items';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'item_list' => '\Europharmacy\EuromedicaClient\Model\Item[]'
];
/**
* 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 = [
'item_list' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'item_list' => 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 = [
'item_list' => 'itemList'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'item_list' => 'setItemList'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'item_list' => 'getItemList'
];
/**
* 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('item_list', $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 item_list
*
* @return \Europharmacy\EuromedicaClient\Model\Item[]|null
*/
public function getItemList()
{
return $this->container['item_list'];
}
/**
* Sets item_list
*
* @param \Europharmacy\EuromedicaClient\Model\Item[]|null $item_list item_list
*
* @return self
*/
public function setItemList($item_list)
{
if (is_null($item_list)) {
array_push($this->openAPINullablesSetToNull, 'item_list');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('item_list', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['item_list'] = $item_list;
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));
}
}

View File

@ -0,0 +1,458 @@
<?php
/**
* MainCategoryDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* MainCategoryDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class MainCategoryDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'MainCategoryDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'main_id' => 'string',
'main_desc' => '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 = [
'main_id' => null,
'main_desc' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'main_id' => true,
'main_desc' => 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 = [
'main_id' => 'mainId',
'main_desc' => 'mainDesc'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'main_id' => 'setMainId',
'main_desc' => 'setMainDesc'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'main_id' => 'getMainId',
'main_desc' => 'getMainDesc'
];
/**
* 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('main_id', $data ?? [], null);
$this->setIfExists('main_desc', $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 main_id
*
* @return string|null
*/
public function getMainId()
{
return $this->container['main_id'];
}
/**
* Sets main_id
*
* @param string|null $main_id main_id
*
* @return self
*/
public function setMainId($main_id)
{
if (is_null($main_id)) {
array_push($this->openAPINullablesSetToNull, 'main_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('main_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['main_id'] = $main_id;
return $this;
}
/**
* Gets main_desc
*
* @return string|null
*/
public function getMainDesc()
{
return $this->container['main_desc'];
}
/**
* Sets main_desc
*
* @param string|null $main_desc main_desc
*
* @return self
*/
public function setMainDesc($main_desc)
{
if (is_null($main_desc)) {
array_push($this->openAPINullablesSetToNull, 'main_desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('main_desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['main_desc'] = $main_desc;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* MainCategoryDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* MainCategoryDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class MainCategoryDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'MainCategoryDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\MainCategoryDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\MainCategoryDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\MainCategoryDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

View File

@ -0,0 +1,112 @@
<?php
/**
* ModelInterface
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient\Model
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
/**
* Interface abstracting model access.
*
* @package Europharmacy\EuromedicaClient\Model
* @author OpenAPI Generator team
*/
interface ModelInterface
{
/**
* The original name of the model.
*
* @return string
*/
public function getModelName();
/**
* Array of property to type mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPITypes();
/**
* Array of property to format mappings. Used for (de)serialization
*
* @return array
*/
public static function openAPIFormats();
/**
* Array of attributes where the key is the local name, and the value is the original name
*
* @return array
*/
public static function attributeMap();
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @return array
*/
public static function setters();
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @return array
*/
public static function getters();
/**
* Show all the invalid properties with reasons.
*
* @return array
*/
public function listInvalidProperties();
/**
* Validate all the properties in the model
* return true if all passed
*
* @return bool
*/
public function valid();
/**
* Checks if a property is nullable
*
* @param string $property
* @return bool
*/
public static function isNullable(string $property): bool;
/**
* Checks if a nullable property is set to null.
*
* @param string $property
* @return bool
*/
public function isNullableSetToNull(string $property): bool;
}

499
lib/Model/OikosDto.php Normal file
View File

@ -0,0 +1,499 @@
<?php
/**
* OikosDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* OikosDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class OikosDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'OikosDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'desc' => 'string',
'owner_id' => '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' => null,
'desc' => null,
'owner_id' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => true,
'desc' => true,
'owner_id' => 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',
'desc' => 'desc',
'owner_id' => 'ownerId'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'desc' => 'setDesc',
'owner_id' => 'setOwnerId'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'desc' => 'getDesc',
'owner_id' => 'getOwnerId'
];
/**
* 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('desc', $data ?? [], null);
$this->setIfExists('owner_id', $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)) {
array_push($this->openAPINullablesSetToNull, 'id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets desc
*
* @return string|null
*/
public function getDesc()
{
return $this->container['desc'];
}
/**
* Sets desc
*
* @param string|null $desc desc
*
* @return self
*/
public function setDesc($desc)
{
if (is_null($desc)) {
array_push($this->openAPINullablesSetToNull, 'desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['desc'] = $desc;
return $this;
}
/**
* Gets owner_id
*
* @return string|null
*/
public function getOwnerId()
{
return $this->container['owner_id'];
}
/**
* Sets owner_id
*
* @param string|null $owner_id owner_id
*
* @return self
*/
public function setOwnerId($owner_id)
{
if (is_null($owner_id)) {
array_push($this->openAPINullablesSetToNull, 'owner_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('owner_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['owner_id'] = $owner_id;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* OikosDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* OikosDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class OikosDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'OikosDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\OikosDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\OikosDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\OikosDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

458
lib/Model/OwnerDto.php Normal file
View File

@ -0,0 +1,458 @@
<?php
/**
* OwnerDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* OwnerDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class OwnerDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'OwnerDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'desc' => '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' => null,
'desc' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => true,
'desc' => 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',
'desc' => 'desc'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'desc' => 'setDesc'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'desc' => 'getDesc'
];
/**
* 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('desc', $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)) {
array_push($this->openAPINullablesSetToNull, 'id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['id'] = $id;
return $this;
}
/**
* Gets desc
*
* @return string|null
*/
public function getDesc()
{
return $this->container['desc'];
}
/**
* Sets desc
*
* @param string|null $desc desc
*
* @return self
*/
public function setDesc($desc)
{
if (is_null($desc)) {
array_push($this->openAPINullablesSetToNull, 'desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['desc'] = $desc;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* OwnerDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* OwnerDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class OwnerDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'OwnerDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\OwnerDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\OwnerDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\OwnerDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

View File

@ -0,0 +1,574 @@
<?php
/**
* PersonalCategoryDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* PersonalCategoryDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class PersonalCategoryDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'PersonalCategoryDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'id' => 'string',
'name' => 'string',
'parent_id' => 'string',
'visible_web' => 'bool',
'eng_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' => null,
'name' => null,
'parent_id' => null,
'visible_web' => null,
'eng_name' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'id' => true,
'name' => true,
'parent_id' => true,
'visible_web' => false,
'eng_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',
'parent_id' => 'parentId',
'visible_web' => 'visibleWeb',
'eng_name' => 'engName'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'id' => 'setId',
'name' => 'setName',
'parent_id' => 'setParentId',
'visible_web' => 'setVisibleWeb',
'eng_name' => 'setEngName'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'id' => 'getId',
'name' => 'getName',
'parent_id' => 'getParentId',
'visible_web' => 'getVisibleWeb',
'eng_name' => 'getEngName'
];
/**
* 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);
$this->setIfExists('parent_id', $data ?? [], null);
$this->setIfExists('visible_web', $data ?? [], null);
$this->setIfExists('eng_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)) {
array_push($this->openAPINullablesSetToNull, 'id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$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;
}
/**
* Gets parent_id
*
* @return string|null
*/
public function getParentId()
{
return $this->container['parent_id'];
}
/**
* Sets parent_id
*
* @param string|null $parent_id parent_id
*
* @return self
*/
public function setParentId($parent_id)
{
if (is_null($parent_id)) {
array_push($this->openAPINullablesSetToNull, 'parent_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('parent_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['parent_id'] = $parent_id;
return $this;
}
/**
* Gets visible_web
*
* @return bool|null
*/
public function getVisibleWeb()
{
return $this->container['visible_web'];
}
/**
* Sets visible_web
*
* @param bool|null $visible_web visible_web
*
* @return self
*/
public function setVisibleWeb($visible_web)
{
if (is_null($visible_web)) {
throw new \InvalidArgumentException('non-nullable visible_web cannot be null');
}
$this->container['visible_web'] = $visible_web;
return $this;
}
/**
* Gets eng_name
*
* @return string|null
*/
public function getEngName()
{
return $this->container['eng_name'];
}
/**
* Sets eng_name
*
* @param string|null $eng_name eng_name
*
* @return self
*/
public function setEngName($eng_name)
{
if (is_null($eng_name)) {
array_push($this->openAPINullablesSetToNull, 'eng_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('eng_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['eng_name'] = $eng_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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* PersonalCategoryDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* PersonalCategoryDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class PersonalCategoryDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'PersonalCategoryDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\PersonalCategoryDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\PersonalCategoryDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\PersonalCategoryDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

View File

@ -0,0 +1,581 @@
<?php
/**
* ProblemDetails
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* ProblemDetails Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ProblemDetails implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ProblemDetails';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'type' => 'string',
'title' => 'string',
'status' => 'int',
'detail' => 'string',
'instance' => '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 = [
'type' => null,
'title' => null,
'status' => 'int32',
'detail' => null,
'instance' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'type' => true,
'title' => true,
'status' => true,
'detail' => true,
'instance' => 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 = [
'type' => 'type',
'title' => 'title',
'status' => 'status',
'detail' => 'detail',
'instance' => 'instance'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'type' => 'setType',
'title' => 'setTitle',
'status' => 'setStatus',
'detail' => 'setDetail',
'instance' => 'setInstance'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'type' => 'getType',
'title' => 'getTitle',
'status' => 'getStatus',
'detail' => 'getDetail',
'instance' => 'getInstance'
];
/**
* 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('type', $data ?? [], null);
$this->setIfExists('title', $data ?? [], null);
$this->setIfExists('status', $data ?? [], null);
$this->setIfExists('detail', $data ?? [], null);
$this->setIfExists('instance', $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 type
*
* @return string|null
*/
public function getType()
{
return $this->container['type'];
}
/**
* Sets type
*
* @param string|null $type type
*
* @return self
*/
public function setType($type)
{
if (is_null($type)) {
array_push($this->openAPINullablesSetToNull, 'type');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('type', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['type'] = $type;
return $this;
}
/**
* Gets title
*
* @return string|null
*/
public function getTitle()
{
return $this->container['title'];
}
/**
* Sets title
*
* @param string|null $title title
*
* @return self
*/
public function setTitle($title)
{
if (is_null($title)) {
array_push($this->openAPINullablesSetToNull, 'title');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('title', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['title'] = $title;
return $this;
}
/**
* Gets status
*
* @return int|null
*/
public function getStatus()
{
return $this->container['status'];
}
/**
* Sets status
*
* @param int|null $status status
*
* @return self
*/
public function setStatus($status)
{
if (is_null($status)) {
array_push($this->openAPINullablesSetToNull, 'status');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('status', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['status'] = $status;
return $this;
}
/**
* Gets detail
*
* @return string|null
*/
public function getDetail()
{
return $this->container['detail'];
}
/**
* Sets detail
*
* @param string|null $detail detail
*
* @return self
*/
public function setDetail($detail)
{
if (is_null($detail)) {
array_push($this->openAPINullablesSetToNull, 'detail');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('detail', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['detail'] = $detail;
return $this;
}
/**
* Gets instance
*
* @return string|null
*/
public function getInstance()
{
return $this->container['instance'];
}
/**
* Sets instance
*
* @param string|null $instance instance
*
* @return self
*/
public function setInstance($instance)
{
if (is_null($instance)) {
array_push($this->openAPINullablesSetToNull, 'instance');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('instance', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['instance'] = $instance;
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));
}
}

1747
lib/Model/ProductDto.php Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,730 @@
<?php
/**
* ProductDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* ProductDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class ProductDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'ProductDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\ProductDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\ProductDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\ProductDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

929
lib/Model/Shipping.php Normal file
View File

@ -0,0 +1,929 @@
<?php
/**
* Shipping
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* Shipping Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class Shipping implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'shipping';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'last_name' => 'string',
'first_name' => 'string',
'address' => 'string',
'city' => 'string',
'postcode' => 'string',
'state' => 'string',
'country' => 'string',
'country_code' => 'string',
'phone' => 'string',
'cellphone' => 'string',
'email' => '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 = [
'last_name' => null,
'first_name' => null,
'address' => null,
'city' => null,
'postcode' => null,
'state' => null,
'country' => null,
'country_code' => null,
'phone' => null,
'cellphone' => null,
'email' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'last_name' => true,
'first_name' => true,
'address' => true,
'city' => true,
'postcode' => true,
'state' => true,
'country' => true,
'country_code' => true,
'phone' => true,
'cellphone' => true,
'email' => 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 = [
'last_name' => 'lastName',
'first_name' => 'firstName',
'address' => 'address',
'city' => 'city',
'postcode' => 'postcode',
'state' => 'state',
'country' => 'country',
'country_code' => 'countryCode',
'phone' => 'phone',
'cellphone' => 'cellphone',
'email' => 'email'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'last_name' => 'setLastName',
'first_name' => 'setFirstName',
'address' => 'setAddress',
'city' => 'setCity',
'postcode' => 'setPostcode',
'state' => 'setState',
'country' => 'setCountry',
'country_code' => 'setCountryCode',
'phone' => 'setPhone',
'cellphone' => 'setCellphone',
'email' => 'setEmail'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'last_name' => 'getLastName',
'first_name' => 'getFirstName',
'address' => 'getAddress',
'city' => 'getCity',
'postcode' => 'getPostcode',
'state' => 'getState',
'country' => 'getCountry',
'country_code' => 'getCountryCode',
'phone' => 'getPhone',
'cellphone' => 'getCellphone',
'email' => 'getEmail'
];
/**
* 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('last_name', $data ?? [], null);
$this->setIfExists('first_name', $data ?? [], null);
$this->setIfExists('address', $data ?? [], null);
$this->setIfExists('city', $data ?? [], null);
$this->setIfExists('postcode', $data ?? [], null);
$this->setIfExists('state', $data ?? [], null);
$this->setIfExists('country', $data ?? [], null);
$this->setIfExists('country_code', $data ?? [], null);
$this->setIfExists('phone', $data ?? [], null);
$this->setIfExists('cellphone', $data ?? [], null);
$this->setIfExists('email', $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 = [];
if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) > 60)) {
$invalidProperties[] = "invalid value for 'last_name', the character length must be smaller than or equal to 60.";
}
if (!is_null($this->container['last_name']) && (mb_strlen($this->container['last_name']) < 1)) {
$invalidProperties[] = "invalid value for 'last_name', the character length must be bigger than or equal to 1.";
}
if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) > 60)) {
$invalidProperties[] = "invalid value for 'first_name', the character length must be smaller than or equal to 60.";
}
if (!is_null($this->container['first_name']) && (mb_strlen($this->container['first_name']) < 1)) {
$invalidProperties[] = "invalid value for 'first_name', the character length must be bigger than or equal to 1.";
}
if (!is_null($this->container['address']) && (mb_strlen($this->container['address']) > 120)) {
$invalidProperties[] = "invalid value for 'address', the character length must be smaller than or equal to 120.";
}
if (!is_null($this->container['city']) && (mb_strlen($this->container['city']) > 60)) {
$invalidProperties[] = "invalid value for 'city', the character length must be smaller than or equal to 60.";
}
if (!is_null($this->container['postcode']) && (mb_strlen($this->container['postcode']) > 10)) {
$invalidProperties[] = "invalid value for 'postcode', the character length must be smaller than or equal to 10.";
}
if (!is_null($this->container['state']) && (mb_strlen($this->container['state']) > 60)) {
$invalidProperties[] = "invalid value for 'state', the character length must be smaller than or equal to 60.";
}
if (!is_null($this->container['country']) && (mb_strlen($this->container['country']) > 20)) {
$invalidProperties[] = "invalid value for 'country', the character length must be smaller than or equal to 20.";
}
if (!is_null($this->container['country_code']) && (mb_strlen($this->container['country_code']) > 2)) {
$invalidProperties[] = "invalid value for 'country_code', the character length must be smaller than or equal to 2.";
}
if (!is_null($this->container['phone']) && (mb_strlen($this->container['phone']) > 15)) {
$invalidProperties[] = "invalid value for 'phone', the character length must be smaller than or equal to 15.";
}
if (!is_null($this->container['cellphone']) && (mb_strlen($this->container['cellphone']) > 15)) {
$invalidProperties[] = "invalid value for 'cellphone', the character length must be smaller than or equal to 15.";
}
if (!is_null($this->container['email']) && (mb_strlen($this->container['email']) > 60)) {
$invalidProperties[] = "invalid value for 'email', the character length must be smaller than or equal to 60.";
}
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 last_name
*
* @return string|null
*/
public function getLastName()
{
return $this->container['last_name'];
}
/**
* Sets last_name
*
* @param string|null $last_name last_name
*
* @return self
*/
public function setLastName($last_name)
{
if (is_null($last_name)) {
array_push($this->openAPINullablesSetToNull, 'last_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('last_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($last_name) && (mb_strlen($last_name) > 60)) {
throw new \InvalidArgumentException('invalid length for $last_name when calling Shipping., must be smaller than or equal to 60.');
}
if (!is_null($last_name) && (mb_strlen($last_name) < 1)) {
throw new \InvalidArgumentException('invalid length for $last_name when calling Shipping., must be bigger than or equal to 1.');
}
$this->container['last_name'] = $last_name;
return $this;
}
/**
* Gets first_name
*
* @return string|null
*/
public function getFirstName()
{
return $this->container['first_name'];
}
/**
* Sets first_name
*
* @param string|null $first_name first_name
*
* @return self
*/
public function setFirstName($first_name)
{
if (is_null($first_name)) {
array_push($this->openAPINullablesSetToNull, 'first_name');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('first_name', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($first_name) && (mb_strlen($first_name) > 60)) {
throw new \InvalidArgumentException('invalid length for $first_name when calling Shipping., must be smaller than or equal to 60.');
}
if (!is_null($first_name) && (mb_strlen($first_name) < 1)) {
throw new \InvalidArgumentException('invalid length for $first_name when calling Shipping., must be bigger than or equal to 1.');
}
$this->container['first_name'] = $first_name;
return $this;
}
/**
* Gets address
*
* @return string|null
*/
public function getAddress()
{
return $this->container['address'];
}
/**
* Sets address
*
* @param string|null $address address
*
* @return self
*/
public function setAddress($address)
{
if (is_null($address)) {
array_push($this->openAPINullablesSetToNull, 'address');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('address', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($address) && (mb_strlen($address) > 120)) {
throw new \InvalidArgumentException('invalid length for $address when calling Shipping., must be smaller than or equal to 120.');
}
$this->container['address'] = $address;
return $this;
}
/**
* Gets city
*
* @return string|null
*/
public function getCity()
{
return $this->container['city'];
}
/**
* Sets city
*
* @param string|null $city city
*
* @return self
*/
public function setCity($city)
{
if (is_null($city)) {
array_push($this->openAPINullablesSetToNull, 'city');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('city', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($city) && (mb_strlen($city) > 60)) {
throw new \InvalidArgumentException('invalid length for $city when calling Shipping., must be smaller than or equal to 60.');
}
$this->container['city'] = $city;
return $this;
}
/**
* Gets postcode
*
* @return string|null
*/
public function getPostcode()
{
return $this->container['postcode'];
}
/**
* Sets postcode
*
* @param string|null $postcode postcode
*
* @return self
*/
public function setPostcode($postcode)
{
if (is_null($postcode)) {
array_push($this->openAPINullablesSetToNull, 'postcode');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('postcode', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($postcode) && (mb_strlen($postcode) > 10)) {
throw new \InvalidArgumentException('invalid length for $postcode when calling Shipping., must be smaller than or equal to 10.');
}
$this->container['postcode'] = $postcode;
return $this;
}
/**
* Gets state
*
* @return string|null
*/
public function getState()
{
return $this->container['state'];
}
/**
* Sets state
*
* @param string|null $state state
*
* @return self
*/
public function setState($state)
{
if (is_null($state)) {
array_push($this->openAPINullablesSetToNull, 'state');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('state', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($state) && (mb_strlen($state) > 60)) {
throw new \InvalidArgumentException('invalid length for $state when calling Shipping., must be smaller than or equal to 60.');
}
$this->container['state'] = $state;
return $this;
}
/**
* Gets country
*
* @return string|null
*/
public function getCountry()
{
return $this->container['country'];
}
/**
* Sets country
*
* @param string|null $country country
*
* @return self
*/
public function setCountry($country)
{
if (is_null($country)) {
array_push($this->openAPINullablesSetToNull, 'country');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('country', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($country) && (mb_strlen($country) > 20)) {
throw new \InvalidArgumentException('invalid length for $country when calling Shipping., must be smaller than or equal to 20.');
}
$this->container['country'] = $country;
return $this;
}
/**
* Gets country_code
*
* @return string|null
*/
public function getCountryCode()
{
return $this->container['country_code'];
}
/**
* Sets country_code
*
* @param string|null $country_code country_code
*
* @return self
*/
public function setCountryCode($country_code)
{
if (is_null($country_code)) {
array_push($this->openAPINullablesSetToNull, 'country_code');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('country_code', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($country_code) && (mb_strlen($country_code) > 2)) {
throw new \InvalidArgumentException('invalid length for $country_code when calling Shipping., must be smaller than or equal to 2.');
}
$this->container['country_code'] = $country_code;
return $this;
}
/**
* Gets phone
*
* @return string|null
*/
public function getPhone()
{
return $this->container['phone'];
}
/**
* Sets phone
*
* @param string|null $phone phone
*
* @return self
*/
public function setPhone($phone)
{
if (is_null($phone)) {
array_push($this->openAPINullablesSetToNull, 'phone');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('phone', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($phone) && (mb_strlen($phone) > 15)) {
throw new \InvalidArgumentException('invalid length for $phone when calling Shipping., must be smaller than or equal to 15.');
}
$this->container['phone'] = $phone;
return $this;
}
/**
* Gets cellphone
*
* @return string|null
*/
public function getCellphone()
{
return $this->container['cellphone'];
}
/**
* Sets cellphone
*
* @param string|null $cellphone cellphone
*
* @return self
*/
public function setCellphone($cellphone)
{
if (is_null($cellphone)) {
array_push($this->openAPINullablesSetToNull, 'cellphone');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('cellphone', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($cellphone) && (mb_strlen($cellphone) > 15)) {
throw new \InvalidArgumentException('invalid length for $cellphone when calling Shipping., must be smaller than or equal to 15.');
}
$this->container['cellphone'] = $cellphone;
return $this;
}
/**
* Gets email
*
* @return string|null
*/
public function getEmail()
{
return $this->container['email'];
}
/**
* Sets email
*
* @param string|null $email email
*
* @return self
*/
public function setEmail($email)
{
if (is_null($email)) {
array_push($this->openAPINullablesSetToNull, 'email');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('email', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
if (!is_null($email) && (mb_strlen($email) > 60)) {
throw new \InvalidArgumentException('invalid length for $email when calling Shipping., must be smaller than or equal to 60.');
}
$this->container['email'] = $email;
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));
}
}

View File

@ -0,0 +1,499 @@
<?php
/**
* SubCategoryDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* SubCategoryDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class SubCategoryDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'SubCategoryDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'sc_id' => 'string',
'sc_desc' => 'string',
'ca_id' => '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 = [
'sc_id' => null,
'sc_desc' => null,
'ca_id' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'sc_id' => true,
'sc_desc' => true,
'ca_id' => 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 = [
'sc_id' => 'scId',
'sc_desc' => 'scDesc',
'ca_id' => 'caId'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'sc_id' => 'setScId',
'sc_desc' => 'setScDesc',
'ca_id' => 'setCaId'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'sc_id' => 'getScId',
'sc_desc' => 'getScDesc',
'ca_id' => 'getCaId'
];
/**
* 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('sc_id', $data ?? [], null);
$this->setIfExists('sc_desc', $data ?? [], null);
$this->setIfExists('ca_id', $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 sc_id
*
* @return string|null
*/
public function getScId()
{
return $this->container['sc_id'];
}
/**
* Sets sc_id
*
* @param string|null $sc_id sc_id
*
* @return self
*/
public function setScId($sc_id)
{
if (is_null($sc_id)) {
array_push($this->openAPINullablesSetToNull, 'sc_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('sc_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['sc_id'] = $sc_id;
return $this;
}
/**
* Gets sc_desc
*
* @return string|null
*/
public function getScDesc()
{
return $this->container['sc_desc'];
}
/**
* Sets sc_desc
*
* @param string|null $sc_desc sc_desc
*
* @return self
*/
public function setScDesc($sc_desc)
{
if (is_null($sc_desc)) {
array_push($this->openAPINullablesSetToNull, 'sc_desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('sc_desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['sc_desc'] = $sc_desc;
return $this;
}
/**
* Gets ca_id
*
* @return string|null
*/
public function getCaId()
{
return $this->container['ca_id'];
}
/**
* Sets ca_id
*
* @param string|null $ca_id ca_id
*
* @return self
*/
public function setCaId($ca_id)
{
if (is_null($ca_id)) {
array_push($this->openAPINullablesSetToNull, 'ca_id');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('ca_id', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['ca_id'] = $ca_id;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* SubCategoryDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* SubCategoryDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class SubCategoryDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'SubCategoryDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\SubCategoryDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\SubCategoryDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\SubCategoryDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

View File

@ -0,0 +1,485 @@
<?php
/**
* VatCategoryDto
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* VatCategoryDto Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class VatCategoryDto implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'VatCategoryDto';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'vat_code' => 'int',
'vat_value' => 'float',
'vat_desc' => '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 = [
'vat_code' => 'int32',
'vat_value' => 'double',
'vat_desc' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'vat_code' => false,
'vat_value' => false,
'vat_desc' => 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 = [
'vat_code' => 'vatCode',
'vat_value' => 'vatValue',
'vat_desc' => 'vatDesc'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'vat_code' => 'setVatCode',
'vat_value' => 'setVatValue',
'vat_desc' => 'setVatDesc'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'vat_code' => 'getVatCode',
'vat_value' => 'getVatValue',
'vat_desc' => 'getVatDesc'
];
/**
* 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('vat_code', $data ?? [], null);
$this->setIfExists('vat_value', $data ?? [], null);
$this->setIfExists('vat_desc', $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 vat_code
*
* @return int|null
*/
public function getVatCode()
{
return $this->container['vat_code'];
}
/**
* Sets vat_code
*
* @param int|null $vat_code vat_code
*
* @return self
*/
public function setVatCode($vat_code)
{
if (is_null($vat_code)) {
throw new \InvalidArgumentException('non-nullable vat_code cannot be null');
}
$this->container['vat_code'] = $vat_code;
return $this;
}
/**
* Gets vat_value
*
* @return float|null
*/
public function getVatValue()
{
return $this->container['vat_value'];
}
/**
* Sets vat_value
*
* @param float|null $vat_value vat_value
*
* @return self
*/
public function setVatValue($vat_value)
{
if (is_null($vat_value)) {
throw new \InvalidArgumentException('non-nullable vat_value cannot be null');
}
$this->container['vat_value'] = $vat_value;
return $this;
}
/**
* Gets vat_desc
*
* @return string|null
*/
public function getVatDesc()
{
return $this->container['vat_desc'];
}
/**
* Sets vat_desc
*
* @param string|null $vat_desc vat_desc
*
* @return self
*/
public function setVatDesc($vat_desc)
{
if (is_null($vat_desc)) {
array_push($this->openAPINullablesSetToNull, 'vat_desc');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('vat_desc', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['vat_desc'] = $vat_desc;
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));
}
}

View File

@ -0,0 +1,730 @@
<?php
/**
* VatCategoryDtoPagedResponse
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Model;
use \ArrayAccess;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
/**
* VatCategoryDtoPagedResponse Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
* @implements \ArrayAccess<string, mixed>
*/
class VatCategoryDtoPagedResponse implements ModelInterface, ArrayAccess, \JsonSerializable
{
public const DISCRIMINATOR = null;
/**
* The original name of the model.
*
* @var string
*/
protected static $openAPIModelName = 'VatCategoryDtoPagedResponse';
/**
* Array of property to type mappings. Used for (de)serialization
*
* @var string[]
*/
protected static $openAPITypes = [
'time_stamp' => '\DateTime',
'page_number' => 'int',
'page_size' => 'int',
'total_items' => 'int',
'total_pages' => 'int',
'last_page' => 'bool',
'data_size' => 'int',
'is_success' => 'bool',
'errors' => 'string[]',
'data' => '\Europharmacy\EuromedicaClient\Model\VatCategoryDto[]'
];
/**
* 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 = [
'time_stamp' => 'date-time',
'page_number' => 'int32',
'page_size' => 'int32',
'total_items' => 'int32',
'total_pages' => 'int32',
'last_page' => null,
'data_size' => 'int32',
'is_success' => null,
'errors' => null,
'data' => null
];
/**
* Array of nullable properties. Used for (de)serialization
*
* @var boolean[]
*/
protected static array $openAPINullables = [
'time_stamp' => false,
'page_number' => false,
'page_size' => false,
'total_items' => false,
'total_pages' => false,
'last_page' => false,
'data_size' => false,
'is_success' => false,
'errors' => true,
'data' => 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 = [
'time_stamp' => 'timeStamp',
'page_number' => 'pageNumber',
'page_size' => 'pageSize',
'total_items' => 'totalItems',
'total_pages' => 'totalPages',
'last_page' => 'lastPage',
'data_size' => 'dataSize',
'is_success' => 'isSuccess',
'errors' => 'errors',
'data' => 'data'
];
/**
* Array of attributes to setter functions (for deserialization of responses)
*
* @var string[]
*/
protected static $setters = [
'time_stamp' => 'setTimeStamp',
'page_number' => 'setPageNumber',
'page_size' => 'setPageSize',
'total_items' => 'setTotalItems',
'total_pages' => 'setTotalPages',
'last_page' => 'setLastPage',
'data_size' => 'setDataSize',
'is_success' => 'setIsSuccess',
'errors' => 'setErrors',
'data' => 'setData'
];
/**
* Array of attributes to getter functions (for serialization of requests)
*
* @var string[]
*/
protected static $getters = [
'time_stamp' => 'getTimeStamp',
'page_number' => 'getPageNumber',
'page_size' => 'getPageSize',
'total_items' => 'getTotalItems',
'total_pages' => 'getTotalPages',
'last_page' => 'getLastPage',
'data_size' => 'getDataSize',
'is_success' => 'getIsSuccess',
'errors' => 'getErrors',
'data' => 'getData'
];
/**
* 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('time_stamp', $data ?? [], null);
$this->setIfExists('page_number', $data ?? [], null);
$this->setIfExists('page_size', $data ?? [], null);
$this->setIfExists('total_items', $data ?? [], null);
$this->setIfExists('total_pages', $data ?? [], null);
$this->setIfExists('last_page', $data ?? [], null);
$this->setIfExists('data_size', $data ?? [], null);
$this->setIfExists('is_success', $data ?? [], null);
$this->setIfExists('errors', $data ?? [], null);
$this->setIfExists('data', $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 time_stamp
*
* @return \DateTime|null
*/
public function getTimeStamp()
{
return $this->container['time_stamp'];
}
/**
* Sets time_stamp
*
* @param \DateTime|null $time_stamp time_stamp
*
* @return self
*/
public function setTimeStamp($time_stamp)
{
if (is_null($time_stamp)) {
throw new \InvalidArgumentException('non-nullable time_stamp cannot be null');
}
$this->container['time_stamp'] = $time_stamp;
return $this;
}
/**
* Gets page_number
*
* @return int|null
*/
public function getPageNumber()
{
return $this->container['page_number'];
}
/**
* Sets page_number
*
* @param int|null $page_number page_number
*
* @return self
*/
public function setPageNumber($page_number)
{
if (is_null($page_number)) {
throw new \InvalidArgumentException('non-nullable page_number cannot be null');
}
$this->container['page_number'] = $page_number;
return $this;
}
/**
* Gets page_size
*
* @return int|null
*/
public function getPageSize()
{
return $this->container['page_size'];
}
/**
* Sets page_size
*
* @param int|null $page_size page_size
*
* @return self
*/
public function setPageSize($page_size)
{
if (is_null($page_size)) {
throw new \InvalidArgumentException('non-nullable page_size cannot be null');
}
$this->container['page_size'] = $page_size;
return $this;
}
/**
* Gets total_items
*
* @return int|null
*/
public function getTotalItems()
{
return $this->container['total_items'];
}
/**
* Sets total_items
*
* @param int|null $total_items total_items
*
* @return self
*/
public function setTotalItems($total_items)
{
if (is_null($total_items)) {
throw new \InvalidArgumentException('non-nullable total_items cannot be null');
}
$this->container['total_items'] = $total_items;
return $this;
}
/**
* Gets total_pages
*
* @return int|null
*/
public function getTotalPages()
{
return $this->container['total_pages'];
}
/**
* Sets total_pages
*
* @param int|null $total_pages total_pages
*
* @return self
*/
public function setTotalPages($total_pages)
{
if (is_null($total_pages)) {
throw new \InvalidArgumentException('non-nullable total_pages cannot be null');
}
$this->container['total_pages'] = $total_pages;
return $this;
}
/**
* Gets last_page
*
* @return bool|null
*/
public function getLastPage()
{
return $this->container['last_page'];
}
/**
* Sets last_page
*
* @param bool|null $last_page last_page
*
* @return self
*/
public function setLastPage($last_page)
{
if (is_null($last_page)) {
throw new \InvalidArgumentException('non-nullable last_page cannot be null');
}
$this->container['last_page'] = $last_page;
return $this;
}
/**
* Gets data_size
*
* @return int|null
*/
public function getDataSize()
{
return $this->container['data_size'];
}
/**
* Sets data_size
*
* @param int|null $data_size data_size
*
* @return self
*/
public function setDataSize($data_size)
{
if (is_null($data_size)) {
throw new \InvalidArgumentException('non-nullable data_size cannot be null');
}
$this->container['data_size'] = $data_size;
return $this;
}
/**
* Gets is_success
*
* @return bool|null
*/
public function getIsSuccess()
{
return $this->container['is_success'];
}
/**
* Sets is_success
*
* @param bool|null $is_success is_success
*
* @return self
*/
public function setIsSuccess($is_success)
{
if (is_null($is_success)) {
throw new \InvalidArgumentException('non-nullable is_success cannot be null');
}
$this->container['is_success'] = $is_success;
return $this;
}
/**
* Gets errors
*
* @return string[]|null
*/
public function getErrors()
{
return $this->container['errors'];
}
/**
* Sets errors
*
* @param string[]|null $errors errors
*
* @return self
*/
public function setErrors($errors)
{
if (is_null($errors)) {
array_push($this->openAPINullablesSetToNull, 'errors');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('errors', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['errors'] = $errors;
return $this;
}
/**
* Gets data
*
* @return \Europharmacy\EuromedicaClient\Model\VatCategoryDto[]|null
*/
public function getData()
{
return $this->container['data'];
}
/**
* Sets data
*
* @param \Europharmacy\EuromedicaClient\Model\VatCategoryDto[]|null $data data
*
* @return self
*/
public function setData($data)
{
if (is_null($data)) {
array_push($this->openAPINullablesSetToNull, 'data');
} else {
$nullablesSetToNull = $this->getOpenAPINullablesSetToNull();
$index = array_search('data', $nullablesSetToNull);
if ($index !== FALSE) {
unset($nullablesSetToNull[$index]);
$this->setOpenAPINullablesSetToNull($nullablesSetToNull);
}
}
$this->container['data'] = $data;
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));
}
}

618
lib/ObjectSerializer.php Normal file
View File

@ -0,0 +1,618 @@
<?php
/**
* ObjectSerializer
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient;
use GuzzleHttp\Psr7\Utils;
use Europharmacy\EuromedicaClient\Model\ModelInterface;
/**
* ObjectSerializer Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ObjectSerializer
{
/** @var string */
private static $dateTimeFormat = \DateTime::ATOM;
/**
* Change the date format
*
* @param string $format the new date format to use
*/
public static function setDateTimeFormat($format)
{
self::$dateTimeFormat = $format;
}
/**
* Serialize data
*
* @param mixed $data the data to serialize
* @param string|null $type the OpenAPIToolsType of the data
* @param string|null $format the format of the OpenAPITools type of the data
*
* @return scalar|object|array|null serialized form of $data
*/
public static function sanitizeForSerialization($data, $type = null, $format = null)
{
if (is_scalar($data) || null === $data) {
return $data;
}
if ($data instanceof \DateTime) {
return ($format === 'date') ? $data->format('Y-m-d') : $data->format(self::$dateTimeFormat);
}
if (is_array($data)) {
foreach ($data as $property => $value) {
$data[$property] = self::sanitizeForSerialization($value);
}
return $data;
}
if (is_object($data)) {
$values = [];
if ($data instanceof ModelInterface) {
$formats = $data::openAPIFormats();
foreach ($data::openAPITypes() as $property => $openAPIType) {
$getter = $data::getters()[$property];
$value = $data->$getter();
if ($value !== null && !in_array($openAPIType, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
$callable = [$openAPIType, 'getAllowableEnumValues'];
if (is_callable($callable)) {
/** array $callable */
$allowedEnumTypes = $callable();
if (!in_array($value, $allowedEnumTypes, true)) {
$imploded = implode("', '", $allowedEnumTypes);
throw new \InvalidArgumentException("Invalid value for enum '$openAPIType', must be one of: '$imploded'");
}
}
}
if (($data::isNullable($property) && $data->isNullableSetToNull($property)) || $value !== null) {
$values[$data::attributeMap()[$property]] = self::sanitizeForSerialization($value, $openAPIType, $formats[$property]);
}
}
} else {
foreach($data as $property => $value) {
$values[$property] = self::sanitizeForSerialization($value);
}
}
return (object)$values;
} else {
return (string)$data;
}
}
/**
* Sanitize filename by removing path.
* e.g. ../../sun.gif becomes sun.gif
*
* @param string $filename filename to be sanitized
*
* @return string the sanitized filename
*/
public static function sanitizeFilename($filename)
{
if (preg_match("/.*[\/\\\\](.*)$/", $filename, $match)) {
return $match[1];
} else {
return $filename;
}
}
/**
* Shorter timestamp microseconds to 6 digits length.
*
* @param string $timestamp Original timestamp
*
* @return string the shorten timestamp
*/
public static function sanitizeTimestamp($timestamp)
{
if (!is_string($timestamp)) return $timestamp;
return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp);
}
/**
* Take value and turn it into a string suitable for inclusion in
* the path, by url-encoding.
*
* @param string $value a string which will be part of the path
*
* @return string the serialized object
*/
public static function toPathValue($value)
{
return rawurlencode(self::toString($value));
}
/**
* Checks if a value is empty, based on its OpenAPI type.
*
* @param mixed $value
* @param string $openApiType
*
* @return bool true if $value is empty
*/
private static function isEmptyValue($value, string $openApiType): bool
{
# If empty() returns false, it is not empty regardless of its type.
if (!empty($value)) {
return false;
}
# Null is always empty, as we cannot send a real "null" value in a query parameter.
if ($value === null) {
return true;
}
switch ($openApiType) {
# For numeric values, false and '' are considered empty.
# This comparison is safe for floating point values, since the previous call to empty() will
# filter out values that don't match 0.
case 'int':
case 'integer':
return $value !== 0;
case 'number':
case 'float':
return $value !== 0 && $value !== 0.0;
# For boolean values, '' is considered empty
case 'bool':
case 'boolean':
return !in_array($value, [false, 0], true);
# For string values, '' is considered empty.
case 'string':
return $value === '';
# For all the other types, any value at this point can be considered empty.
default:
return true;
}
}
/**
* Take query parameter properties and turn it into an array suitable for
* native http_build_query or GuzzleHttp\Psr7\Query::build.
*
* @param mixed $value Parameter value
* @param string $paramName Parameter name
* @param string $openApiType OpenAPIType eg. array or object
* @param string $style Parameter serialization style
* @param bool $explode Parameter explode option
* @param bool $required Whether query param is required or not
*
* @return array
*/
public static function toQueryValue(
$value,
string $paramName,
string $openApiType = 'string',
string $style = 'form',
bool $explode = true,
bool $required = true
): array {
# Check if we should omit this parameter from the query. This should only happen when:
# - Parameter is NOT required; AND
# - its value is set to a value that is equivalent to "empty", depending on its OpenAPI type. For
# example, 0 as "int" or "boolean" is NOT an empty value.
if (self::isEmptyValue($value, $openApiType)) {
if ($required) {
return ["{$paramName}" => ''];
} else {
return [];
}
}
# Handle DateTime objects in query
if($openApiType === "\\DateTime" && $value instanceof \DateTime) {
return ["{$paramName}" => $value->format(self::$dateTimeFormat)];
}
$query = [];
$value = (in_array($openApiType, ['object', 'array'], true)) ? (array)$value : $value;
// since \GuzzleHttp\Psr7\Query::build fails with nested arrays
// need to flatten array first
$flattenArray = function ($arr, $name, &$result = []) use (&$flattenArray, $style, $explode) {
if (!is_array($arr)) return $arr;
foreach ($arr as $k => $v) {
$prop = ($style === 'deepObject') ? $prop = "{$name}[{$k}]" : $k;
if (is_array($v)) {
$flattenArray($v, $prop, $result);
} else {
if ($style !== 'deepObject' && !$explode) {
// push key itself
$result[] = $prop;
}
$result[$prop] = $v;
}
}
return $result;
};
$value = $flattenArray($value, $paramName);
// https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values
if ($openApiType === 'array' && $style === 'deepObject' && $explode) {
return $value;
}
if ($openApiType === 'object' && ($style === 'deepObject' || $explode)) {
return $value;
}
if ('boolean' === $openApiType && is_bool($value)) {
$value = self::convertBoolToQueryStringFormat($value);
}
// handle style in serializeCollection
$query[$paramName] = ($explode) ? $value : self::serializeCollection((array)$value, $style);
return $query;
}
/**
* Convert boolean value to format for query string.
*
* @param bool $value Boolean value
*
* @return int|string Boolean value in format
*/
public static function convertBoolToQueryStringFormat(bool $value)
{
if (Configuration::BOOLEAN_FORMAT_STRING == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()) {
return $value ? 'true' : 'false';
}
return (int) $value;
}
/**
* Take value and turn it into a string suitable for inclusion in
* the header. If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param string $value a string which will be part of the header
*
* @return string the header string
*/
public static function toHeaderValue($value)
{
$callable = [$value, 'toHeaderValue'];
if (is_callable($callable)) {
return $callable();
}
return self::toString($value);
}
/**
* Take value and turn it into a string suitable for inclusion in
* the http body (form parameter). If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
*
* @param string|\SplFileObject $value the value of the form parameter
*
* @return string the form string
*/
public static function toFormValue($value)
{
if ($value instanceof \SplFileObject) {
return $value->getRealPath();
} else {
return self::toString($value);
}
}
/**
* Take value and turn it into a string suitable for inclusion in
* the parameter. If it's a string, pass through unchanged
* If it's a datetime object, format it in ISO8601
* If it's a boolean, convert it to "true" or "false".
*
* @param float|int|bool|\DateTime $value the value of the parameter
*
* @return string the header string
*/
public static function toString($value)
{
if ($value instanceof \DateTime) { // datetime in ISO8601 format
return $value->format(self::$dateTimeFormat);
} elseif (is_bool($value)) {
return $value ? 'true' : 'false';
} else {
return (string) $value;
}
}
/**
* Serialize an array to a string.
*
* @param array $collection collection to serialize to a string
* @param string $style the format use for serialization (csv,
* ssv, tsv, pipes, multi)
* @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array
*
* @return string
*/
public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false)
{
if ($allowCollectionFormatMulti && ('multi' === $style)) {
// http_build_query() almost does the job for us. We just
// need to fix the result of multidimensional arrays.
return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&'));
}
switch ($style) {
case 'pipeDelimited':
case 'pipes':
return implode('|', $collection);
case 'tsv':
return implode("\t", $collection);
case 'spaceDelimited':
case 'ssv':
return implode(' ', $collection);
case 'simple':
case 'csv':
// Deliberate fall through. CSV is default format.
default:
return implode(',', $collection);
}
}
/**
* Deserialize a JSON string into an object
*
* @param mixed $data object or primitive to be deserialized
* @param string $class class name is passed as a string
* @param string[]|null $httpHeaders HTTP headers
*
* @return object|array|null a single or an array of $class instances
*/
public static function deserialize($data, $class, $httpHeaders = null)
{
if (null === $data) {
return null;
}
if (strcasecmp(substr($class, -2), '[]') === 0) {
$data = is_string($data) ? json_decode($data) : $data;
if (!is_array($data)) {
throw new \InvalidArgumentException("Invalid array '$class'");
}
$subClass = substr($class, 0, -2);
$values = [];
foreach ($data as $key => $value) {
$values[] = self::deserialize($value, $subClass, null);
}
return $values;
}
if (preg_match('/^(array<|map\[)/', $class)) { // for associative array e.g. array<string,int>
$data = is_string($data) ? json_decode($data) : $data;
settype($data, 'array');
$inner = substr($class, 4, -1);
$deserialized = [];
if (strrpos($inner, ",") !== false) {
$subClass_array = explode(',', $inner, 2);
$subClass = $subClass_array[1];
foreach ($data as $key => $value) {
$deserialized[$key] = self::deserialize($value, $subClass, null);
}
}
return $deserialized;
}
if ($class === 'object') {
settype($data, 'array');
return $data;
} elseif ($class === 'mixed') {
settype($data, gettype($data));
return $data;
}
if ($class === '\DateTime') {
// Some APIs return an invalid, empty string as a
// date-time property. DateTime::__construct() will return
// the current time for empty input which is probably not
// what is meant. The invalid empty string is probably to
// be interpreted as a missing field/value. Let's handle
// this graceful.
if (!empty($data)) {
try {
return new \DateTime($data);
} catch (\Exception $exception) {
// Some APIs return a date-time with too high nanosecond
// precision for php's DateTime to handle.
// With provided regexp 6 digits of microseconds saved
return new \DateTime(self::sanitizeTimestamp($data));
}
} else {
return null;
}
}
if ($class === '\SplFileObject') {
$data = Utils::streamFor($data);
/** @var \Psr\Http\Message\StreamInterface $data */
// determine file name
if (
is_array($httpHeaders)
&& array_key_exists('Content-Disposition', $httpHeaders)
&& preg_match('/inline; filename=[\'"]?([^\'"\s]+)[\'"]?$/i', $httpHeaders['Content-Disposition'], $match)
) {
$filename = Configuration::getDefaultConfiguration()->getTempFolderPath() . DIRECTORY_SEPARATOR . self::sanitizeFilename($match[1]);
} else {
$filename = tempnam(Configuration::getDefaultConfiguration()->getTempFolderPath(), '');
}
$file = fopen($filename, 'w');
while ($chunk = $data->read(200)) {
fwrite($file, $chunk);
}
fclose($file);
return new \SplFileObject($filename, 'r');
}
/** @psalm-suppress ParadoxicalCondition */
if (in_array($class, ['\DateTime', '\SplFileObject', 'array', 'bool', 'boolean', 'byte', 'float', 'int', 'integer', 'mixed', 'number', 'object', 'string', 'void'], true)) {
settype($data, $class);
return $data;
}
if (method_exists($class, 'getAllowableEnumValues')) {
if (!in_array($data, $class::getAllowableEnumValues(), true)) {
$imploded = implode("', '", $class::getAllowableEnumValues());
throw new \InvalidArgumentException("Invalid value for enum '$class', must be one of: '$imploded'");
}
return $data;
} else {
$data = is_string($data) ? json_decode($data) : $data;
if (is_array($data)) {
$data = (object)$data;
}
// If a discriminator is defined and points to a valid subclass, use it.
$discriminator = $class::DISCRIMINATOR;
if (!empty($discriminator) && isset($data->{$discriminator}) && is_string($data->{$discriminator})) {
$subclass = '\Europharmacy\EuromedicaClient\Model\\' . $data->{$discriminator};
if (is_subclass_of($subclass, $class)) {
$class = $subclass;
}
}
/** @var ModelInterface $instance */
$instance = new $class();
foreach ($instance::openAPITypes() as $property => $type) {
$propertySetter = $instance::setters()[$property];
if (!isset($propertySetter)) {
continue;
}
if (!isset($data->{$instance::attributeMap()[$property]})) {
if ($instance::isNullable($property)) {
$instance->$propertySetter(null);
}
continue;
}
if (isset($data->{$instance::attributeMap()[$property]})) {
$propertyValue = $data->{$instance::attributeMap()[$property]};
$instance->$propertySetter(self::deserialize($propertyValue, $type, null));
}
}
return $instance;
}
}
/**
* Build a query string from an array of key value pairs.
*
* This function can use the return value of `parse()` to build a query
* string. This function does not modify the provided keys when an array is
* encountered (like `http_build_query()` would).
*
* The function is copied from https://github.com/guzzle/psr7/blob/a243f80a1ca7fe8ceed4deee17f12c1930efe662/src/Query.php#L59-L112
* with a modification which is described in https://github.com/guzzle/psr7/pull/603
*
* @param array $params Query string parameters.
* @param int|false $encoding Set to false to not encode, PHP_QUERY_RFC3986
* to encode using RFC3986, or PHP_QUERY_RFC1738
* to encode using RFC1738.
*/
public static function buildQuery(array $params, $encoding = PHP_QUERY_RFC3986): string
{
if (!$params) {
return '';
}
if ($encoding === false) {
$encoder = function (string $str): string {
return $str;
};
} elseif ($encoding === PHP_QUERY_RFC3986) {
$encoder = 'rawurlencode';
} elseif ($encoding === PHP_QUERY_RFC1738) {
$encoder = 'urlencode';
} else {
throw new \InvalidArgumentException('Invalid type');
}
$castBool = Configuration::BOOLEAN_FORMAT_INT == Configuration::getDefaultConfiguration()->getBooleanFormatForQueryString()
? function ($v) { return (int) $v; }
: function ($v) { return $v ? 'true' : 'false'; };
$qs = '';
foreach ($params as $k => $v) {
$k = $encoder((string) $k);
if (!is_array($v)) {
$qs .= $k;
$v = is_bool($v) ? $castBool($v) : $v;
if ($v !== null) {
$qs .= '='.$encoder((string) $v);
}
$qs .= '&';
} else {
foreach ($v as $vv) {
$qs .= $k;
$vv = is_bool($vv) ? $castBool($vv) : $vv;
if ($vv !== null) {
$qs .= '='.$encoder((string) $vv);
}
$qs .= '&';
}
}
}
return $qs ? (string) substr($qs, 0, -1) : '';
}
}

18
phpunit.xml.dist Normal file
View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="./vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./lib/Api</directory>
<directory suffix=".php">./lib/Model</directory>
</include>
</coverage>
<testsuites>
<testsuite name="tests">
<directory>./test/Api</directory>
<directory>./test/Model</directory>
</testsuite>
</testsuites>
<php>
<ini name="error_reporting" value="E_ALL"/>
</php>
</phpunit>

View File

@ -0,0 +1,110 @@
<?php
/**
* CustomersApiTest
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Api;
use \Europharmacy\EuromedicaClient\Configuration;
use \Europharmacy\EuromedicaClient\ApiException;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* CustomersApiTest Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CustomersApiTest 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 apiCustomersGet
*
* Αναζήτηση πελατών.
*
*/
public function testApiCustomersGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiCustomersIdGet
*
* Προβολή πελάτη βάσει Id.
*
*/
public function testApiCustomersIdGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiCustomersPost
*
* Εισαγωγή ή επεξεργασία πελάτη.
*
*/
public function testApiCustomersPost()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

98
test/Api/EshopApiTest.php Normal file
View File

@ -0,0 +1,98 @@
<?php
/**
* EshopApiTest
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Api;
use \Europharmacy\EuromedicaClient\Configuration;
use \Europharmacy\EuromedicaClient\ApiException;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* EshopApiTest Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class EshopApiTest 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 apiEshopOrderIdPost
*
* Εισαγωγή / Τροποποίηση παραγγελίας.
*
*/
public function testApiEshopOrderIdPost()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiEshopStatusGet
*
* Κατάσταση παραγγελιών.
*
*/
public function testApiEshopStatusGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,158 @@
<?php
/**
* MasterDataApiTest
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Api;
use \Europharmacy\EuromedicaClient\Configuration;
use \Europharmacy\EuromedicaClient\ApiException;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* MasterDataApiTest Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class MasterDataApiTest 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 apiMasterDataCategoriesGet
*
* Κατηγορίες (Product.categId).
*
*/
public function testApiMasterDataCategoriesGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataMainCategoriesGet
*
* Κύριες κατηγορίες (Product.mainCategId).
*
*/
public function testApiMasterDataMainCategoriesGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataOikoiGet
*
* Οίκοι (Product.oikosId).
*
*/
public function testApiMasterDataOikoiGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataOwnersGet
*
* Εταιρία (Product.ownerId).
*
*/
public function testApiMasterDataOwnersGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataPersonalCategoriesGet
*
* Προσωπικές Κατηγορίες (Product.perCatId , Product.perCat2Id , Product.perCat3Id).
*
*/
public function testApiMasterDataPersonalCategoriesGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataSubCategoriesGet
*
* Κατηγορίες (Product.subCategId).
*
*/
public function testApiMasterDataSubCategoriesGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiMasterDataVatCaterogiesGet
*
* Κατηφορίες ΦΠΑ.
*
*/
public function testApiMasterDataVatCaterogiesGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,110 @@
<?php
/**
* ProductsApiTest
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Api;
use \Europharmacy\EuromedicaClient\Configuration;
use \Europharmacy\EuromedicaClient\ApiException;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* ProductsApiTest Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class ProductsApiTest 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 apiProductsBarcodeGet
*
* Αναζήτηση βάσει barcode.
*
*/
public function testApiProductsBarcodeGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiProductsDataboxBarcodePost
*
* .
*
*/
public function testApiProductsDataboxBarcodePost()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiProductsGet
*
* Αναζήτηση ειδών.
*
*/
public function testApiProductsGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

110
test/Api/WelcomeApiTest.php Normal file
View File

@ -0,0 +1,110 @@
<?php
/**
* WelcomeApiTest
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Api;
use \Europharmacy\EuromedicaClient\Configuration;
use \Europharmacy\EuromedicaClient\ApiException;
use \Europharmacy\EuromedicaClient\ObjectSerializer;
use PHPUnit\Framework\TestCase;
/**
* WelcomeApiTest Class Doc Comment
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class WelcomeApiTest 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 apiWelcomeGet
*
* .
*
*/
public function testApiWelcomeGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiWelcomeHead
*
* .
*
*/
public function testApiWelcomeHead()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test case for apiWelcomeSecureGet
*
* .
*
*/
public function testApiWelcomeSecureGet()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

226
test/Model/BillingTest.php Normal file
View File

@ -0,0 +1,226 @@
<?php
/**
* BillingTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* BillingTest Class Doc Comment
*
* @category Class
* @description Billing
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class BillingTest 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 "Billing"
*/
public function testBilling()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "last_name"
*/
public function testPropertyLastName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "first_name"
*/
public function testPropertyFirstName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "address"
*/
public function testPropertyAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "city"
*/
public function testPropertyCity()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "postcode"
*/
public function testPropertyPostcode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "state"
*/
public function testPropertyState()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "country"
*/
public function testPropertyCountry()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "country_code"
*/
public function testPropertyCountryCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "phone"
*/
public function testPropertyPhone()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "cellphone"
*/
public function testPropertyCellphone()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "email"
*/
public function testPropertyEmail()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "is_invoice"
*/
public function testPropertyIsInvoice()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "commercial_name"
*/
public function testPropertyCommercialName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "tax_number"
*/
public function testPropertyTaxNumber()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "tax_office"
*/
public function testPropertyTaxOffice()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "activity"
*/
public function testPropertyActivity()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,172 @@
<?php
/**
* CategoryDtoListPagedResponseTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CategoryDtoListPagedResponseTest Class Doc Comment
*
* @category Class
* @description CategoryDtoListPagedResponse
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CategoryDtoListPagedResponseTest 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 "CategoryDtoListPagedResponse"
*/
public function testCategoryDtoListPagedResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "time_stamp"
*/
public function testPropertyTimeStamp()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page_number"
*/
public function testPropertyPageNumber()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page_size"
*/
public function testPropertyPageSize()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "total_items"
*/
public function testPropertyTotalItems()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "total_pages"
*/
public function testPropertyTotalPages()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "last_page"
*/
public function testPropertyLastPage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "data_size"
*/
public function testPropertyDataSize()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "is_success"
*/
public function testPropertyIsSuccess()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "errors"
*/
public function testPropertyErrors()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "data"
*/
public function testPropertyData()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,100 @@
<?php
/**
* CategoryDtoTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CategoryDtoTest Class Doc Comment
*
* @category Class
* @description CategoryDto
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CategoryDtoTest 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 "CategoryDto"
*/
public function testCategoryDto()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "categ_id"
*/
public function testPropertyCategId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "categ_desc"
*/
public function testPropertyCategDesc()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

100
test/Model/CouponTest.php Normal file
View File

@ -0,0 +1,100 @@
<?php
/**
* CouponTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CouponTest Class Doc Comment
*
* @category Class
* @description Coupon
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CouponTest 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 "Coupon"
*/
public function testCoupon()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "code"
*/
public function testPropertyCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "amount"
*/
public function testPropertyAmount()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,91 @@
<?php
/**
* CouponsTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CouponsTest Class Doc Comment
*
* @category Class
* @description Τα κουπόνια είναι αξιακά και όχι ποσοστιαία . Σε περίπτωση που δεν υπάρχουν να παραλείπεται
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CouponsTest 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 "Coupons"
*/
public function testCoupons()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "coupon_list"
*/
public function testPropertyCouponList()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,262 @@
<?php
/**
* CustomerDtoTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CustomerDtoTest Class Doc Comment
*
* @category Class
* @description CustomerDto
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CustomerDtoTest 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 "CustomerDto"
*/
public function testCustomerDto()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "id"
*/
public function testPropertyId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "last_name"
*/
public function testPropertyLastName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "first_name"
*/
public function testPropertyFirstName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "nikcname"
*/
public function testPropertyNikcname()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "phone"
*/
public function testPropertyPhone()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "mobile"
*/
public function testPropertyMobile()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "amka"
*/
public function testPropertyAmka()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "address"
*/
public function testPropertyAddress()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "post_code"
*/
public function testPropertyPostCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "city"
*/
public function testPropertyCity()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "country_code"
*/
public function testPropertyCountryCode()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "country_name"
*/
public function testPropertyCountryName()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "birth_day"
*/
public function testPropertyBirthDay()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "tax_number"
*/
public function testPropertyTaxNumber()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "tax_office"
*/
public function testPropertyTaxOffice()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "profession"
*/
public function testPropertyProfession()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "brand_id"
*/
public function testPropertyBrandId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "email"
*/
public function testPropertyEmail()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "notes"
*/
public function testPropertyNotes()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "eshop_id"
*/
public function testPropertyEshopId()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

View File

@ -0,0 +1,172 @@
<?php
/**
* CustomerPagedResponseTest
*
* PHP version 7.4
*
* @category Class
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
/**
* Euromedica Two Web Api
*
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: v1
* Contact: development@europharmacy.gr
* Generated by: https://openapi-generator.tech
* Generator version: 7.12.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 Europharmacy\EuromedicaClient\Test\Model;
use PHPUnit\Framework\TestCase;
/**
* CustomerPagedResponseTest Class Doc Comment
*
* @category Class
* @description CustomerPagedResponse
* @package Europharmacy\EuromedicaClient
* @author OpenAPI Generator team
* @link https://openapi-generator.tech
*/
class CustomerPagedResponseTest 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 "CustomerPagedResponse"
*/
public function testCustomerPagedResponse()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "time_stamp"
*/
public function testPropertyTimeStamp()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page_number"
*/
public function testPropertyPageNumber()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "page_size"
*/
public function testPropertyPageSize()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "total_items"
*/
public function testPropertyTotalItems()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "total_pages"
*/
public function testPropertyTotalPages()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "last_page"
*/
public function testPropertyLastPage()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "data_size"
*/
public function testPropertyDataSize()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "is_success"
*/
public function testPropertyIsSuccess()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "errors"
*/
public function testPropertyErrors()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
/**
* Test attribute "data"
*/
public function testPropertyData()
{
// TODO: implement
self::markTestIncomplete('Not implemented');
}
}

Some files were not shown because too many files have changed in this diff Show More