From 29b507bce45b82b3949087547994c699dde40cbf Mon Sep 17 00:00:00 2001 From: Patience Igiraneza Date: Wed, 4 Jun 2025 15:25:44 +0200 Subject: [PATCH 1/2] feat: develop the version 2.0 allowing to perform normal operations --- .openapi-generator/FILES | 74 ++++-- README.md | 63 +++-- docs/AliasDisplay.md | 31 +++ docs/ChangeEmailQuota.md | 30 +++ docs/ChangeQuotaApi.md | 29 ++- docs/ChangeQuotaCreate200Response.md | 30 +++ docs/CreateAliasApi.md | 29 ++- docs/DeleteAlias.md | 31 +++ docs/DeleteAliasApi.md | 29 ++- docs/DeleteEmail.md | 31 +++ docs/DeleteEmailApi.md | 29 ++- docs/DnsInfoCreate200Response.md | 10 +- docs/Domain.md | 29 +++ docs/DomainAction.md | 30 +++ docs/DomainAliasApi.md | 29 ++- docs/DomainApi.md | 29 ++- docs/DomainInfoApi.md | 29 ++- docs/EmailAlias.md | 31 +++ docs/EmailDisplay.md | 36 +++ docs/ImportApi.md | 29 ++- docs/ImportCreateRequest.md | 30 +++ docs/OpenExchangeCreateAccount.md | 32 +++ docs/OrderDisplay.md | 51 ++++ docs/PasswordReset.md | 30 +++ docs/ResetPasswordApi.md | 29 ++- docs/ServiceAction.md | 29 +++ docs/SubScriptionInfo.md | 30 +++ docs/SubscriptionInfoApi.md | 29 ++- docs/SubscriptionInfoCreate200Response.md | 35 +++ docs/SubscriptionInfoResponse.md | 30 +++ docs/SubscriptionsApi.md | 104 +++++--- docs/SubscriptionsRead200Response.md | 31 +++ docs/UpgradeApi.md | 29 ++- setup.py | 17 +- test/test_alias_display.py | 55 ++++ test/test_change_email_quota.py | 55 ++++ test/test_change_quota_create200_response.py | 53 ++++ test/test_delete_alias.py | 57 +++++ test/test_delete_email.py | 57 +++++ test/test_domain.py | 53 ++++ test/test_domain_action.py | 55 ++++ test/test_email_alias.py | 57 +++++ test/test_email_display.py | 60 +++++ test/test_import_create_request.py | 55 ++++ test/test_open_exchange_create_account.py | 63 +++++ test/test_order_display.py | 75 ++++++ test/test_password_reset.py | 55 ++++ test/test_service_action.py | 53 ++++ test/test_sub_scription_info.py | 55 ++++ ...st_subscription_info_create200_response.py | 58 +++++ test/test_subscription_info_response.py | 121 +++++++++ test/test_subscriptions_read200_response.py | 56 ++++ workplace_console_client/__init__.py | 18 ++ .../api/change_quota_api.py | 62 ++++- .../api/create_alias_api.py | 62 ++++- .../api/delete_alias_api.py | 62 ++++- .../api/delete_email_api.py | 62 ++++- .../api/domain_alias_api.py | 63 ++++- workplace_console_client/api/domain_api.py | 62 ++++- .../api/domain_info_api.py | 62 ++++- workplace_console_client/api/import_api.py | 62 ++++- .../api/reset_password_api.py | 62 ++++- .../api/subscription_info_api.py | 62 ++++- .../api/subscriptions_api.py | 242 ++++++++++++------ workplace_console_client/api/upgrade_api.py | 62 ++++- workplace_console_client/models/__init__.py | 18 ++ .../models/alias_display.py | 97 +++++++ .../models/change_email_quota.py | 91 +++++++ .../models/change_quota_create200_response.py | 90 +++++++ .../models/delete_alias.py | 93 +++++++ .../models/delete_email.py | 93 +++++++ .../models/dns_info_create200_response.py | 26 +- workplace_console_client/models/domain.py | 89 +++++++ .../models/domain_action.py | 91 +++++++ .../models/email_alias.py | 93 +++++++ .../models/email_display.py | 120 +++++++++ .../models/import_create_request.py | 90 +++++++ .../models/open_exchange_create_account.py | 95 +++++++ .../models/order_display.py | 175 +++++++++++++ .../models/password_reset.py | 91 +++++++ .../models/service_action.py | 89 +++++++ .../models/sub_scription_info.py | 91 +++++++ .../subscription_info_create200_response.py | 100 ++++++++ .../models/subscription_info_response.py | 102 ++++++++ .../models/subscriptions_read200_response.py | 92 +++++++ 85 files changed, 4646 insertions(+), 380 deletions(-) create mode 100644 docs/AliasDisplay.md create mode 100644 docs/ChangeEmailQuota.md create mode 100644 docs/ChangeQuotaCreate200Response.md create mode 100644 docs/DeleteAlias.md create mode 100644 docs/DeleteEmail.md create mode 100644 docs/Domain.md create mode 100644 docs/DomainAction.md create mode 100644 docs/EmailAlias.md create mode 100644 docs/EmailDisplay.md create mode 100644 docs/ImportCreateRequest.md create mode 100644 docs/OpenExchangeCreateAccount.md create mode 100644 docs/OrderDisplay.md create mode 100644 docs/PasswordReset.md create mode 100644 docs/ServiceAction.md create mode 100644 docs/SubScriptionInfo.md create mode 100644 docs/SubscriptionInfoCreate200Response.md create mode 100644 docs/SubscriptionInfoResponse.md create mode 100644 docs/SubscriptionsRead200Response.md create mode 100644 test/test_alias_display.py create mode 100644 test/test_change_email_quota.py create mode 100644 test/test_change_quota_create200_response.py create mode 100644 test/test_delete_alias.py create mode 100644 test/test_delete_email.py create mode 100644 test/test_domain.py create mode 100644 test/test_domain_action.py create mode 100644 test/test_email_alias.py create mode 100644 test/test_email_display.py create mode 100644 test/test_import_create_request.py create mode 100644 test/test_open_exchange_create_account.py create mode 100644 test/test_order_display.py create mode 100644 test/test_password_reset.py create mode 100644 test/test_service_action.py create mode 100644 test/test_sub_scription_info.py create mode 100644 test/test_subscription_info_create200_response.py create mode 100644 test/test_subscription_info_response.py create mode 100644 test/test_subscriptions_read200_response.py create mode 100644 workplace_console_client/models/alias_display.py create mode 100644 workplace_console_client/models/change_email_quota.py create mode 100644 workplace_console_client/models/change_quota_create200_response.py create mode 100644 workplace_console_client/models/delete_alias.py create mode 100644 workplace_console_client/models/delete_email.py create mode 100644 workplace_console_client/models/domain.py create mode 100644 workplace_console_client/models/domain_action.py create mode 100644 workplace_console_client/models/email_alias.py create mode 100644 workplace_console_client/models/email_display.py create mode 100644 workplace_console_client/models/import_create_request.py create mode 100644 workplace_console_client/models/open_exchange_create_account.py create mode 100644 workplace_console_client/models/order_display.py create mode 100644 workplace_console_client/models/password_reset.py create mode 100644 workplace_console_client/models/service_action.py create mode 100644 workplace_console_client/models/sub_scription_info.py create mode 100644 workplace_console_client/models/subscription_info_create200_response.py create mode 100644 workplace_console_client/models/subscription_info_response.py create mode 100644 workplace_console_client/models/subscriptions_read200_response.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 4d77bdc..d7ff0f9 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -1,25 +1,42 @@ .github/workflows/python.yml .gitignore .gitlab-ci.yml -.openapi-generator-ignore .travis.yml README.md +docs/AliasDisplay.md +docs/ChangeEmailQuota.md docs/ChangeQuotaApi.md +docs/ChangeQuotaCreate200Response.md docs/CreateAliasApi.md +docs/DeleteAlias.md docs/DeleteAliasApi.md +docs/DeleteEmail.md docs/DeleteEmailApi.md docs/DnsInfoApi.md docs/DnsInfoCreate200Response.md docs/DnsInfoCreateRequest.md +docs/Domain.md +docs/DomainAction.md docs/DomainAliasApi.md docs/DomainApi.md docs/DomainInfoApi.md +docs/EmailAlias.md +docs/EmailDisplay.md docs/GetTokenApi.md docs/ImportApi.md +docs/ImportCreateRequest.md +docs/OpenExchangeCreateAccount.md +docs/OrderDisplay.md +docs/PasswordReset.md docs/RefreshTokenApi.md docs/ResetPasswordApi.md +docs/ServiceAction.md +docs/SubScriptionInfo.md docs/SubscriptionInfoApi.md +docs/SubscriptionInfoCreate200Response.md +docs/SubscriptionInfoResponse.md docs/SubscriptionsApi.md +docs/SubscriptionsRead200Response.md docs/TokenObtainPair.md docs/TokenRefresh.md docs/UpgradeApi.md @@ -30,25 +47,24 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_change_quota_api.py -test/test_create_alias_api.py -test/test_delete_alias_api.py -test/test_delete_email_api.py -test/test_dns_info_api.py -test/test_dns_info_create200_response.py -test/test_dns_info_create_request.py -test/test_domain_alias_api.py -test/test_domain_api.py -test/test_domain_info_api.py -test/test_get_token_api.py -test/test_import_api.py -test/test_refresh_token_api.py -test/test_reset_password_api.py -test/test_subscription_info_api.py -test/test_subscriptions_api.py -test/test_token_obtain_pair.py -test/test_token_refresh.py -test/test_upgrade_api.py +test/test_alias_display.py +test/test_change_email_quota.py +test/test_change_quota_create200_response.py +test/test_delete_alias.py +test/test_delete_email.py +test/test_domain.py +test/test_domain_action.py +test/test_email_alias.py +test/test_email_display.py +test/test_import_create_request.py +test/test_open_exchange_create_account.py +test/test_order_display.py +test/test_password_reset.py +test/test_service_action.py +test/test_sub_scription_info.py +test/test_subscription_info_create200_response.py +test/test_subscription_info_response.py +test/test_subscriptions_read200_response.py tox.ini workplace_console_client/__init__.py workplace_console_client/api/__init__.py @@ -72,8 +88,26 @@ workplace_console_client/api_response.py workplace_console_client/configuration.py workplace_console_client/exceptions.py workplace_console_client/models/__init__.py +workplace_console_client/models/alias_display.py +workplace_console_client/models/change_email_quota.py +workplace_console_client/models/change_quota_create200_response.py +workplace_console_client/models/delete_alias.py +workplace_console_client/models/delete_email.py workplace_console_client/models/dns_info_create200_response.py workplace_console_client/models/dns_info_create_request.py +workplace_console_client/models/domain.py +workplace_console_client/models/domain_action.py +workplace_console_client/models/email_alias.py +workplace_console_client/models/email_display.py +workplace_console_client/models/import_create_request.py +workplace_console_client/models/open_exchange_create_account.py +workplace_console_client/models/order_display.py +workplace_console_client/models/password_reset.py +workplace_console_client/models/service_action.py +workplace_console_client/models/sub_scription_info.py +workplace_console_client/models/subscription_info_create200_response.py +workplace_console_client/models/subscription_info_response.py +workplace_console_client/models/subscriptions_read200_response.py workplace_console_client/models/token_obtain_pair.py workplace_console_client/models/token_refresh.py workplace_console_client/py.typed diff --git a/README.md b/README.md index 34e220d..e657c4e 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,10 @@ -# Workplace Console Client +# workplace-console-client +Test description -This is the Truehost's pip package for using the workplace console API from other python applications. +This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v1 -- Package version: 1.0.1 +- Package version: 1.0.0 - Generator version: 7.13.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen @@ -17,9 +18,9 @@ Python 3.9+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/truehost/workplace-console-client.git +pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/truehost/workplace-console-client.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) Then import the package: ```python @@ -76,9 +77,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.ChangeQuotaApi(api_client) + data = workplace_console_client.ChangeEmailQuota() # ChangeEmailQuota | try: - api_instance.change_quota_create() + # Change email quota. + api_response = api_instance.change_quota_create(data) + print("The response of ChangeQuotaApi->change_quota_create:\n") + pprint(api_response) except ApiException as e: print("Exception when calling ChangeQuotaApi->change_quota_create: %s\n" % e) @@ -90,30 +95,48 @@ All URIs are relative to *http://127.0.0.1:8000/api* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*ChangeQuotaApi* | [**change_quota_create**](docs/ChangeQuotaApi.md#change_quota_create) | **POST** /change-quota/ | -*CreateAliasApi* | [**create_alias_create**](docs/CreateAliasApi.md#create_alias_create) | **POST** /create-alias/ | -*DeleteAliasApi* | [**delete_alias_create**](docs/DeleteAliasApi.md#delete_alias_create) | **POST** /delete-alias/ | -*DeleteEmailApi* | [**delete_email_create**](docs/DeleteEmailApi.md#delete_email_create) | **POST** /delete-email/ | +*ChangeQuotaApi* | [**change_quota_create**](docs/ChangeQuotaApi.md#change_quota_create) | **POST** /change-quota/ | Change email quota. +*CreateAliasApi* | [**create_alias_create**](docs/CreateAliasApi.md#create_alias_create) | **POST** /create-alias/ | Create email alias. +*DeleteAliasApi* | [**delete_alias_create**](docs/DeleteAliasApi.md#delete_alias_create) | **POST** /delete-alias/ | Delete alias. +*DeleteEmailApi* | [**delete_email_create**](docs/DeleteEmailApi.md#delete_email_create) | **POST** /delete-email/ | Delete email. *DnsInfoApi* | [**dns_info_create**](docs/DnsInfoApi.md#dns_info_create) | **POST** /dns-info/ | -*DomainApi* | [**domain_create**](docs/DomainApi.md#domain_create) | **POST** /domain/ | -*DomainAliasApi* | [**domain_alias_create**](docs/DomainAliasApi.md#domain_alias_create) | **POST** /domain-alias/ | -*DomainInfoApi* | [**domain_info_create**](docs/DomainInfoApi.md#domain_info_create) | **POST** /domain-info/ | +*DomainApi* | [**domain_create**](docs/DomainApi.md#domain_create) | **POST** /domain/ | Update domain subscription status, delete, suspend, unsuspend, etc... +*DomainAliasApi* | [**domain_alias_create**](docs/DomainAliasApi.md#domain_alias_create) | **POST** /domain-alias/ | Get domain alias list. +*DomainInfoApi* | [**domain_info_create**](docs/DomainInfoApi.md#domain_info_create) | **POST** /domain-info/ | Get domain subscription details. *GetTokenApi* | [**get_token_create**](docs/GetTokenApi.md#get_token_create) | **POST** /get-token/ | -*ImportApi* | [**import_create**](docs/ImportApi.md#import_create) | **POST** /import/ | +*ImportApi* | [**import_create**](docs/ImportApi.md#import_create) | **POST** /import/ | Bulk create emails. *RefreshTokenApi* | [**refresh_token_create**](docs/RefreshTokenApi.md#refresh_token_create) | **POST** /refresh-token/ | -*ResetPasswordApi* | [**reset_password_create**](docs/ResetPasswordApi.md#reset_password_create) | **POST** /reset-password/ | -*SubscriptionInfoApi* | [**subscription_info_create**](docs/SubscriptionInfoApi.md#subscription_info_create) | **POST** /subscription-info/ | -*SubscriptionsApi* | [**subscriptions_create**](docs/SubscriptionsApi.md#subscriptions_create) | **POST** /subscriptions/ | -*SubscriptionsApi* | [**subscriptions_create_0**](docs/SubscriptionsApi.md#subscriptions_create_0) | **POST** /subscriptions/{context_id}/ | +*ResetPasswordApi* | [**reset_password_create**](docs/ResetPasswordApi.md#reset_password_create) | **POST** /reset-password/ | Reset subscription email password. +*SubscriptionInfoApi* | [**subscription_info_create**](docs/SubscriptionInfoApi.md#subscription_info_create) | **POST** /subscription-info/ | Get subscription usage info. +*SubscriptionsApi* | [**subscriptions_create**](docs/SubscriptionsApi.md#subscriptions_create) | **POST** /subscriptions/ | Create a new email subscription, it will create a new subscription for the domain if emails list is not empty *SubscriptionsApi* | [**subscriptions_list**](docs/SubscriptionsApi.md#subscriptions_list) | **GET** /subscriptions/ | -*SubscriptionsApi* | [**subscriptions_read**](docs/SubscriptionsApi.md#subscriptions_read) | **GET** /subscriptions/{context_id}/ | -*UpgradeApi* | [**upgrade_create**](docs/UpgradeApi.md#upgrade_create) | **POST** /upgrade/ | +*SubscriptionsApi* | [**subscriptions_read**](docs/SubscriptionsApi.md#subscriptions_read) | **GET** /subscriptions/{context_id}/ | Get subscription details +*SubscriptionsApi* | [**update_subscription_status**](docs/SubscriptionsApi.md#update_subscription_status) | **POST** /subscriptions/{context_id}/ | Update subscription status, delete, suspend, unsuspend, etc... +*UpgradeApi* | [**upgrade_create**](docs/UpgradeApi.md#upgrade_create) | **POST** /upgrade/ | Upgrade subscription. ## Documentation For Models + - [AliasDisplay](docs/AliasDisplay.md) + - [ChangeEmailQuota](docs/ChangeEmailQuota.md) + - [ChangeQuotaCreate200Response](docs/ChangeQuotaCreate200Response.md) + - [DeleteAlias](docs/DeleteAlias.md) + - [DeleteEmail](docs/DeleteEmail.md) - [DnsInfoCreate200Response](docs/DnsInfoCreate200Response.md) - [DnsInfoCreateRequest](docs/DnsInfoCreateRequest.md) + - [Domain](docs/Domain.md) + - [DomainAction](docs/DomainAction.md) + - [EmailAlias](docs/EmailAlias.md) + - [EmailDisplay](docs/EmailDisplay.md) + - [ImportCreateRequest](docs/ImportCreateRequest.md) + - [OpenExchangeCreateAccount](docs/OpenExchangeCreateAccount.md) + - [OrderDisplay](docs/OrderDisplay.md) + - [PasswordReset](docs/PasswordReset.md) + - [ServiceAction](docs/ServiceAction.md) + - [SubScriptionInfo](docs/SubScriptionInfo.md) + - [SubscriptionInfoCreate200Response](docs/SubscriptionInfoCreate200Response.md) + - [SubscriptionInfoResponse](docs/SubscriptionInfoResponse.md) + - [SubscriptionsRead200Response](docs/SubscriptionsRead200Response.md) - [TokenObtainPair](docs/TokenObtainPair.md) - [TokenRefresh](docs/TokenRefresh.md) diff --git a/docs/AliasDisplay.md b/docs/AliasDisplay.md new file mode 100644 index 0000000..56289a5 --- /dev/null +++ b/docs/AliasDisplay.md @@ -0,0 +1,31 @@ +# AliasDisplay + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [readonly] +**primary_email** | **str** | | [optional] [readonly] +**name** | **str** | | + +## Example + +```python +from workplace_console_client.models.alias_display import AliasDisplay + +# TODO update the JSON string below +json = "{}" +# create an instance of AliasDisplay from a JSON string +alias_display_instance = AliasDisplay.from_json(json) +# print the JSON string representation of the object +print(AliasDisplay.to_json()) + +# convert the object into a dict +alias_display_dict = alias_display_instance.to_dict() +# create an instance of AliasDisplay from a dict +alias_display_from_dict = AliasDisplay.from_dict(alias_display_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChangeEmailQuota.md b/docs/ChangeEmailQuota.md new file mode 100644 index 0000000..1698d1e --- /dev/null +++ b/docs/ChangeEmailQuota.md @@ -0,0 +1,30 @@ +# ChangeEmailQuota + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**quota** | **int** | | + +## Example + +```python +from workplace_console_client.models.change_email_quota import ChangeEmailQuota + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangeEmailQuota from a JSON string +change_email_quota_instance = ChangeEmailQuota.from_json(json) +# print the JSON string representation of the object +print(ChangeEmailQuota.to_json()) + +# convert the object into a dict +change_email_quota_dict = change_email_quota_instance.to_dict() +# create an instance of ChangeEmailQuota from a dict +change_email_quota_from_dict = ChangeEmailQuota.from_dict(change_email_quota_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ChangeQuotaApi.md b/docs/ChangeQuotaApi.md index 9c0894a..c08e36e 100644 --- a/docs/ChangeQuotaApi.md +++ b/docs/ChangeQuotaApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**change_quota_create**](ChangeQuotaApi.md#change_quota_create) | **POST** /change-quota/ | +[**change_quota_create**](ChangeQuotaApi.md#change_quota_create) | **POST** /change-quota/ | Change email quota. # **change_quota_create** -> change_quota_create() +> ChangeQuotaCreate200Response change_quota_create(data) + +Change email quota. + +Change email quota. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_email_quota import ChangeEmailQuota +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.ChangeQuotaApi(api_client) + data = workplace_console_client.ChangeEmailQuota() # ChangeEmailQuota | try: - api_instance.change_quota_create() + # Change email quota. + api_response = api_instance.change_quota_create(data) + print("The response of ChangeQuotaApi->change_quota_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling ChangeQuotaApi->change_quota_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**ChangeEmailQuota**](ChangeEmailQuota.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ChangeQuotaCreate200Response.md b/docs/ChangeQuotaCreate200Response.md new file mode 100644 index 0000000..b4e2fd5 --- /dev/null +++ b/docs/ChangeQuotaCreate200Response.md @@ -0,0 +1,30 @@ +# ChangeQuotaCreate200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**message** | **str** | | [optional] +**error** | **str** | | [optional] + +## Example + +```python +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of ChangeQuotaCreate200Response from a JSON string +change_quota_create200_response_instance = ChangeQuotaCreate200Response.from_json(json) +# print the JSON string representation of the object +print(ChangeQuotaCreate200Response.to_json()) + +# convert the object into a dict +change_quota_create200_response_dict = change_quota_create200_response_instance.to_dict() +# create an instance of ChangeQuotaCreate200Response from a dict +change_quota_create200_response_from_dict = ChangeQuotaCreate200Response.from_dict(change_quota_create200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/CreateAliasApi.md b/docs/CreateAliasApi.md index bdd575a..0898fb0 100644 --- a/docs/CreateAliasApi.md +++ b/docs/CreateAliasApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**create_alias_create**](CreateAliasApi.md#create_alias_create) | **POST** /create-alias/ | +[**create_alias_create**](CreateAliasApi.md#create_alias_create) | **POST** /create-alias/ | Create email alias. # **create_alias_create** -> create_alias_create() +> ChangeQuotaCreate200Response create_alias_create(data) + +Create email alias. + +Create email alias. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.email_alias import EmailAlias from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.CreateAliasApi(api_client) + data = workplace_console_client.EmailAlias() # EmailAlias | try: - api_instance.create_alias_create() + # Create email alias. + api_response = api_instance.create_alias_create(data) + print("The response of CreateAliasApi->create_alias_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling CreateAliasApi->create_alias_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**EmailAlias**](EmailAlias.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DeleteAlias.md b/docs/DeleteAlias.md new file mode 100644 index 0000000..6bf68a2 --- /dev/null +++ b/docs/DeleteAlias.md @@ -0,0 +1,31 @@ +# DeleteAlias + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**alias** | **str** | | +**domain** | **str** | | + +## Example + +```python +from workplace_console_client.models.delete_alias import DeleteAlias + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteAlias from a JSON string +delete_alias_instance = DeleteAlias.from_json(json) +# print the JSON string representation of the object +print(DeleteAlias.to_json()) + +# convert the object into a dict +delete_alias_dict = delete_alias_instance.to_dict() +# create an instance of DeleteAlias from a dict +delete_alias_from_dict = DeleteAlias.from_dict(delete_alias_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteAliasApi.md b/docs/DeleteAliasApi.md index 6ddd052..8e5f5c8 100644 --- a/docs/DeleteAliasApi.md +++ b/docs/DeleteAliasApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_alias_create**](DeleteAliasApi.md#delete_alias_create) | **POST** /delete-alias/ | +[**delete_alias_create**](DeleteAliasApi.md#delete_alias_create) | **POST** /delete-alias/ | Delete alias. # **delete_alias_create** -> delete_alias_create() +> ChangeQuotaCreate200Response delete_alias_create(data) + +Delete alias. + +Delete alias. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_alias import DeleteAlias from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.DeleteAliasApi(api_client) + data = workplace_console_client.DeleteAlias() # DeleteAlias | try: - api_instance.delete_alias_create() + # Delete alias. + api_response = api_instance.delete_alias_create(data) + print("The response of DeleteAliasApi->delete_alias_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling DeleteAliasApi->delete_alias_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**DeleteAlias**](DeleteAlias.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DeleteEmail.md b/docs/DeleteEmail.md new file mode 100644 index 0000000..3149727 --- /dev/null +++ b/docs/DeleteEmail.md @@ -0,0 +1,31 @@ +# DeleteEmail + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**domain** | **str** | | +**subscription** | **int** | | + +## Example + +```python +from workplace_console_client.models.delete_email import DeleteEmail + +# TODO update the JSON string below +json = "{}" +# create an instance of DeleteEmail from a JSON string +delete_email_instance = DeleteEmail.from_json(json) +# print the JSON string representation of the object +print(DeleteEmail.to_json()) + +# convert the object into a dict +delete_email_dict = delete_email_instance.to_dict() +# create an instance of DeleteEmail from a dict +delete_email_from_dict = DeleteEmail.from_dict(delete_email_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DeleteEmailApi.md b/docs/DeleteEmailApi.md index 6798ff4..1391146 100644 --- a/docs/DeleteEmailApi.md +++ b/docs/DeleteEmailApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**delete_email_create**](DeleteEmailApi.md#delete_email_create) | **POST** /delete-email/ | +[**delete_email_create**](DeleteEmailApi.md#delete_email_create) | **POST** /delete-email/ | Delete email. # **delete_email_create** -> delete_email_create() +> ChangeQuotaCreate200Response delete_email_create(data) + +Delete email. + +Delete email. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_email import DeleteEmail from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.DeleteEmailApi(api_client) + data = workplace_console_client.DeleteEmail() # DeleteEmail | try: - api_instance.delete_email_create() + # Delete email. + api_response = api_instance.delete_email_create(data) + print("The response of DeleteEmailApi->delete_email_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling DeleteEmailApi->delete_email_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**DeleteEmail**](DeleteEmail.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DnsInfoCreate200Response.md b/docs/DnsInfoCreate200Response.md index 653bad3..c4974b7 100644 --- a/docs/DnsInfoCreate200Response.md +++ b/docs/DnsInfoCreate200Response.md @@ -5,8 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**score** | **int** | | [optional] +**score** | **float** | | **message** | **str** | | [optional] +**domain** | **str** | | [optional] +**all_dns_score** | **float** | | [optional] +**found** | **float** | | [optional] +**total** | **float** | | [optional] +**missing_dns** | **List[object]** | | [optional] +**other_missing_dns** | **List[object]** | | [optional] +**found_dns** | **object** | | [optional] +**error** | **List[str]** | | [optional] ## Example diff --git a/docs/Domain.md b/docs/Domain.md new file mode 100644 index 0000000..8a7730f --- /dev/null +++ b/docs/Domain.md @@ -0,0 +1,29 @@ +# Domain + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | + +## Example + +```python +from workplace_console_client.models.domain import Domain + +# TODO update the JSON string below +json = "{}" +# create an instance of Domain from a JSON string +domain_instance = Domain.from_json(json) +# print the JSON string representation of the object +print(Domain.to_json()) + +# convert the object into a dict +domain_dict = domain_instance.to_dict() +# create an instance of Domain from a dict +domain_from_dict = Domain.from_dict(domain_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAction.md b/docs/DomainAction.md new file mode 100644 index 0000000..adad045 --- /dev/null +++ b/docs/DomainAction.md @@ -0,0 +1,30 @@ +# DomainAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | | +**domain** | **str** | | + +## Example + +```python +from workplace_console_client.models.domain_action import DomainAction + +# TODO update the JSON string below +json = "{}" +# create an instance of DomainAction from a JSON string +domain_action_instance = DomainAction.from_json(json) +# print the JSON string representation of the object +print(DomainAction.to_json()) + +# convert the object into a dict +domain_action_dict = domain_action_instance.to_dict() +# create an instance of DomainAction from a dict +domain_action_from_dict = DomainAction.from_dict(domain_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/DomainAliasApi.md b/docs/DomainAliasApi.md index 81b82f1..6849b7a 100644 --- a/docs/DomainAliasApi.md +++ b/docs/DomainAliasApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**domain_alias_create**](DomainAliasApi.md#domain_alias_create) | **POST** /domain-alias/ | +[**domain_alias_create**](DomainAliasApi.md#domain_alias_create) | **POST** /domain-alias/ | Get domain alias list. # **domain_alias_create** -> domain_alias_create() +> List[AliasDisplay] domain_alias_create(data) + +Get domain alias list. + +Get domain alias list. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.alias_display import AliasDisplay +from workplace_console_client.models.domain import Domain from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.DomainAliasApi(api_client) + data = workplace_console_client.Domain() # Domain | try: - api_instance.domain_alias_create() + # Get domain alias list. + api_response = api_instance.domain_alias_create(data) + print("The response of DomainAliasApi->domain_alias_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling DomainAliasApi->domain_alias_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**Domain**](Domain.md)| | ### Return type -void (empty response body) +[**List[AliasDisplay]**](AliasDisplay.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DomainApi.md b/docs/DomainApi.md index ba00753..b20f646 100644 --- a/docs/DomainApi.md +++ b/docs/DomainApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**domain_create**](DomainApi.md#domain_create) | **POST** /domain/ | +[**domain_create**](DomainApi.md#domain_create) | **POST** /domain/ | Update domain subscription status, delete, suspend, unsuspend, etc... # **domain_create** -> domain_create() +> ChangeQuotaCreate200Response domain_create(data) + +Update domain subscription status, delete, suspend, unsuspend, etc... + +Update domain subscription status. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.domain_action import DomainAction from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.DomainApi(api_client) + data = workplace_console_client.DomainAction() # DomainAction | try: - api_instance.domain_create() + # Update domain subscription status, delete, suspend, unsuspend, etc... + api_response = api_instance.domain_create(data) + print("The response of DomainApi->domain_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling DomainApi->domain_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**DomainAction**](DomainAction.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/DomainInfoApi.md b/docs/DomainInfoApi.md index 5bcba73..f249b5e 100644 --- a/docs/DomainInfoApi.md +++ b/docs/DomainInfoApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**domain_info_create**](DomainInfoApi.md#domain_info_create) | **POST** /domain-info/ | +[**domain_info_create**](DomainInfoApi.md#domain_info_create) | **POST** /domain-info/ | Get domain subscription details. # **domain_info_create** -> domain_info_create() +> SubscriptionInfoResponse domain_info_create(data) + +Get domain subscription details. + +Get domain subscription details and emails list. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.DomainInfoApi(api_client) + data = workplace_console_client.SubScriptionInfo() # SubScriptionInfo | try: - api_instance.domain_info_create() + # Get domain subscription details. + api_response = api_instance.domain_info_create(data) + print("The response of DomainInfoApi->domain_info_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling DomainInfoApi->domain_info_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**SubScriptionInfo**](SubScriptionInfo.md)| | ### Return type -void (empty response body) +[**SubscriptionInfoResponse**](SubscriptionInfoResponse.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/EmailAlias.md b/docs/EmailAlias.md new file mode 100644 index 0000000..bccbe22 --- /dev/null +++ b/docs/EmailAlias.md @@ -0,0 +1,31 @@ +# EmailAlias + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**domain** | **str** | | +**alias** | **str** | | + +## Example + +```python +from workplace_console_client.models.email_alias import EmailAlias + +# TODO update the JSON string below +json = "{}" +# create an instance of EmailAlias from a JSON string +email_alias_instance = EmailAlias.from_json(json) +# print the JSON string representation of the object +print(EmailAlias.to_json()) + +# convert the object into a dict +email_alias_dict = email_alias_instance.to_dict() +# create an instance of EmailAlias from a dict +email_alias_from_dict = EmailAlias.from_dict(email_alias_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/EmailDisplay.md b/docs/EmailDisplay.md new file mode 100644 index 0000000..0a6da6e --- /dev/null +++ b/docs/EmailDisplay.md @@ -0,0 +1,36 @@ +# EmailDisplay + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [readonly] +**name** | **str** | | +**email_quota** | **int** | Email qoata in GB | [optional] +**max_quota** | **int** | Max email qoata in GB | [optional] +**used_quota** | **int** | Used qoata in GB | [optional] +**email_id** | **int** | | [optional] +**display_name** | **str** | | [optional] +**order** | **int** | | [optional] + +## Example + +```python +from workplace_console_client.models.email_display import EmailDisplay + +# TODO update the JSON string below +json = "{}" +# create an instance of EmailDisplay from a JSON string +email_display_instance = EmailDisplay.from_json(json) +# print the JSON string representation of the object +print(EmailDisplay.to_json()) + +# convert the object into a dict +email_display_dict = email_display_instance.to_dict() +# create an instance of EmailDisplay from a dict +email_display_from_dict = EmailDisplay.from_dict(email_display_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ImportApi.md b/docs/ImportApi.md index 7475105..0c9e0fb 100644 --- a/docs/ImportApi.md +++ b/docs/ImportApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**import_create**](ImportApi.md#import_create) | **POST** /import/ | +[**import_create**](ImportApi.md#import_create) | **POST** /import/ | Bulk create emails. # **import_create** -> import_create() +> ChangeQuotaCreate200Response import_create(data) + +Bulk create emails. + +Bulk create emails via uploaded file and domain. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.import_create_request import ImportCreateRequest from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.ImportApi(api_client) + data = workplace_console_client.ImportCreateRequest() # ImportCreateRequest | try: - api_instance.import_create() + # Bulk create emails. + api_response = api_instance.import_create(data) + print("The response of ImportApi->import_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling ImportApi->import_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**ImportCreateRequest**](ImportCreateRequest.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ImportCreateRequest.md b/docs/ImportCreateRequest.md new file mode 100644 index 0000000..ff4e539 --- /dev/null +++ b/docs/ImportCreateRequest.md @@ -0,0 +1,30 @@ +# ImportCreateRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file** | **bytearray** | CSV or excel file containing email accounts | +**domain** | **str** | Domain to associate with emails | + +## Example + +```python +from workplace_console_client.models.import_create_request import ImportCreateRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of ImportCreateRequest from a JSON string +import_create_request_instance = ImportCreateRequest.from_json(json) +# print the JSON string representation of the object +print(ImportCreateRequest.to_json()) + +# convert the object into a dict +import_create_request_dict = import_create_request_instance.to_dict() +# create an instance of ImportCreateRequest from a dict +import_create_request_from_dict = ImportCreateRequest.from_dict(import_create_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OpenExchangeCreateAccount.md b/docs/OpenExchangeCreateAccount.md new file mode 100644 index 0000000..1cfd5fe --- /dev/null +++ b/docs/OpenExchangeCreateAccount.md @@ -0,0 +1,32 @@ +# OpenExchangeCreateAccount + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**emails** | **List[str]** | | +**domain_name** | **str** | | +**subscription** | **int** | | +**new_subscription** | **bool** | | + +## Example + +```python +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount + +# TODO update the JSON string below +json = "{}" +# create an instance of OpenExchangeCreateAccount from a JSON string +open_exchange_create_account_instance = OpenExchangeCreateAccount.from_json(json) +# print the JSON string representation of the object +print(OpenExchangeCreateAccount.to_json()) + +# convert the object into a dict +open_exchange_create_account_dict = open_exchange_create_account_instance.to_dict() +# create an instance of OpenExchangeCreateAccount from a dict +open_exchange_create_account_from_dict = OpenExchangeCreateAccount.from_dict(open_exchange_create_account_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/OrderDisplay.md b/docs/OrderDisplay.md new file mode 100644 index 0000000..44c60a8 --- /dev/null +++ b/docs/OrderDisplay.md @@ -0,0 +1,51 @@ +# OrderDisplay + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**id** | **int** | | [optional] [readonly] +**context_id** | **int** | | [optional] +**domain** | **str** | | +**enabled** | **bool** | | [optional] +**average_size** | **int** | | [optional] +**filestore_id** | **int** | | [optional] +**filestore_name** | **str** | | [optional] +**max_quota** | **int** | | [optional] +**context_name** | **str** | | [optional] +**used_quota** | **int** | | [optional] +**gab_mode** | **str** | | [optional] +**is_order_active** | **bool** | | [optional] +**updated_at** | **datetime** | | [optional] [readonly] +**created_at** | **datetime** | | [optional] [readonly] +**unallocated_quota** | **int** | | [optional] +**unallocated_alias** | **int** | | [optional] +**is_alias_calculated** | **bool** | | [optional] +**is_alias_synched** | **bool** | | [optional] +**last_dns_check** | **datetime** | | [optional] +**is_dns_valid** | **bool** | | [optional] +**client_id** | **int** | | [optional] +**is_verified** | **bool** | | [optional] +**subscription** | **int** | | [optional] + +## Example + +```python +from workplace_console_client.models.order_display import OrderDisplay + +# TODO update the JSON string below +json = "{}" +# create an instance of OrderDisplay from a JSON string +order_display_instance = OrderDisplay.from_json(json) +# print the JSON string representation of the object +print(OrderDisplay.to_json()) + +# convert the object into a dict +order_display_dict = order_display_instance.to_dict() +# create an instance of OrderDisplay from a dict +order_display_from_dict = OrderDisplay.from_dict(order_display_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/PasswordReset.md b/docs/PasswordReset.md new file mode 100644 index 0000000..0311038 --- /dev/null +++ b/docs/PasswordReset.md @@ -0,0 +1,30 @@ +# PasswordReset + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**email** | **str** | | +**password** | **str** | | + +## Example + +```python +from workplace_console_client.models.password_reset import PasswordReset + +# TODO update the JSON string below +json = "{}" +# create an instance of PasswordReset from a JSON string +password_reset_instance = PasswordReset.from_json(json) +# print the JSON string representation of the object +print(PasswordReset.to_json()) + +# convert the object into a dict +password_reset_dict = password_reset_instance.to_dict() +# create an instance of PasswordReset from a dict +password_reset_from_dict = PasswordReset.from_dict(password_reset_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/ResetPasswordApi.md b/docs/ResetPasswordApi.md index f2812e2..998d33e 100644 --- a/docs/ResetPasswordApi.md +++ b/docs/ResetPasswordApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**reset_password_create**](ResetPasswordApi.md#reset_password_create) | **POST** /reset-password/ | +[**reset_password_create**](ResetPasswordApi.md#reset_password_create) | **POST** /reset-password/ | Reset subscription email password. # **reset_password_create** -> reset_password_create() +> ChangeQuotaCreate200Response reset_password_create(data) + +Reset subscription email password. + +Reset subscription email password. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.password_reset import PasswordReset from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.ResetPasswordApi(api_client) + data = workplace_console_client.PasswordReset() # PasswordReset | try: - api_instance.reset_password_create() + # Reset subscription email password. + api_response = api_instance.reset_password_create(data) + print("The response of ResetPasswordApi->reset_password_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling ResetPasswordApi->reset_password_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**PasswordReset**](PasswordReset.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/ServiceAction.md b/docs/ServiceAction.md new file mode 100644 index 0000000..d1c893e --- /dev/null +++ b/docs/ServiceAction.md @@ -0,0 +1,29 @@ +# ServiceAction + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**action** | **str** | | + +## Example + +```python +from workplace_console_client.models.service_action import ServiceAction + +# TODO update the JSON string below +json = "{}" +# create an instance of ServiceAction from a JSON string +service_action_instance = ServiceAction.from_json(json) +# print the JSON string representation of the object +print(ServiceAction.to_json()) + +# convert the object into a dict +service_action_dict = service_action_instance.to_dict() +# create an instance of ServiceAction from a dict +service_action_from_dict = ServiceAction.from_dict(service_action_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubScriptionInfo.md b/docs/SubScriptionInfo.md new file mode 100644 index 0000000..afe07d1 --- /dev/null +++ b/docs/SubScriptionInfo.md @@ -0,0 +1,30 @@ +# SubScriptionInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain** | **str** | | +**subscription** | **int** | | + +## Example + +```python +from workplace_console_client.models.sub_scription_info import SubScriptionInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of SubScriptionInfo from a JSON string +sub_scription_info_instance = SubScriptionInfo.from_json(json) +# print the JSON string representation of the object +print(SubScriptionInfo.to_json()) + +# convert the object into a dict +sub_scription_info_dict = sub_scription_info_instance.to_dict() +# create an instance of SubScriptionInfo from a dict +sub_scription_info_from_dict = SubScriptionInfo.from_dict(sub_scription_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionInfoApi.md b/docs/SubscriptionInfoApi.md index abd234b..8f19d96 100644 --- a/docs/SubscriptionInfoApi.md +++ b/docs/SubscriptionInfoApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**subscription_info_create**](SubscriptionInfoApi.md#subscription_info_create) | **POST** /subscription-info/ | +[**subscription_info_create**](SubscriptionInfoApi.md#subscription_info_create) | **POST** /subscription-info/ | Get subscription usage info. # **subscription_info_create** -> subscription_info_create() +> SubscriptionInfoCreate200Response subscription_info_create(data) + +Get subscription usage info. + +Get subscription usage info. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.SubscriptionInfoApi(api_client) + data = workplace_console_client.SubScriptionInfo() # SubScriptionInfo | try: - api_instance.subscription_info_create() + # Get subscription usage info. + api_response = api_instance.subscription_info_create(data) + print("The response of SubscriptionInfoApi->subscription_info_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling SubscriptionInfoApi->subscription_info_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**SubScriptionInfo**](SubScriptionInfo.md)| | ### Return type -void (empty response body) +[**SubscriptionInfoCreate200Response**](SubscriptionInfoCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SubscriptionInfoCreate200Response.md b/docs/SubscriptionInfoCreate200Response.md new file mode 100644 index 0000000..97c5488 --- /dev/null +++ b/docs/SubscriptionInfoCreate200Response.md @@ -0,0 +1,35 @@ +# SubscriptionInfoCreate200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**used_emails** | **float** | | [optional] +**remaining_quota** | **float** | | [optional] +**remaining_emails** | **float** | | [optional] +**allowed_emails** | **float** | | [optional] +**allowed_alias** | **float** | | [optional] +**remaining_alias** | **float** | | [optional] +**allowed_quota** | **float** | | [optional] + +## Example + +```python +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionInfoCreate200Response from a JSON string +subscription_info_create200_response_instance = SubscriptionInfoCreate200Response.from_json(json) +# print the JSON string representation of the object +print(SubscriptionInfoCreate200Response.to_json()) + +# convert the object into a dict +subscription_info_create200_response_dict = subscription_info_create200_response_instance.to_dict() +# create an instance of SubscriptionInfoCreate200Response from a dict +subscription_info_create200_response_from_dict = SubscriptionInfoCreate200Response.from_dict(subscription_info_create200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionInfoResponse.md b/docs/SubscriptionInfoResponse.md new file mode 100644 index 0000000..ed4bf6e --- /dev/null +++ b/docs/SubscriptionInfoResponse.md @@ -0,0 +1,30 @@ +# SubscriptionInfoResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**info** | [**OrderDisplay**](OrderDisplay.md) | | +**emails** | [**List[EmailDisplay]**](EmailDisplay.md) | | + +## Example + +```python +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionInfoResponse from a JSON string +subscription_info_response_instance = SubscriptionInfoResponse.from_json(json) +# print the JSON string representation of the object +print(SubscriptionInfoResponse.to_json()) + +# convert the object into a dict +subscription_info_response_dict = subscription_info_response_instance.to_dict() +# create an instance of SubscriptionInfoResponse from a dict +subscription_info_response_from_dict = SubscriptionInfoResponse.from_dict(subscription_info_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/SubscriptionsApi.md b/docs/SubscriptionsApi.md index ff52aff..d4eecec 100644 --- a/docs/SubscriptionsApi.md +++ b/docs/SubscriptionsApi.md @@ -4,14 +4,18 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**subscriptions_create**](SubscriptionsApi.md#subscriptions_create) | **POST** /subscriptions/ | -[**subscriptions_create_0**](SubscriptionsApi.md#subscriptions_create_0) | **POST** /subscriptions/{context_id}/ | +[**subscriptions_create**](SubscriptionsApi.md#subscriptions_create) | **POST** /subscriptions/ | Create a new email subscription, it will create a new subscription for the domain if emails list is not empty [**subscriptions_list**](SubscriptionsApi.md#subscriptions_list) | **GET** /subscriptions/ | -[**subscriptions_read**](SubscriptionsApi.md#subscriptions_read) | **GET** /subscriptions/{context_id}/ | +[**subscriptions_read**](SubscriptionsApi.md#subscriptions_read) | **GET** /subscriptions/{context_id}/ | Get subscription details +[**update_subscription_status**](SubscriptionsApi.md#update_subscription_status) | **POST** /subscriptions/{context_id}/ | Update subscription status, delete, suspend, unsuspend, etc... # **subscriptions_create** -> subscriptions_create() +> ChangeQuotaCreate200Response subscriptions_create(data) + +Create a new email subscription, it will create a new subscription for the domain if emails list is not empty + +Create a new email subscription ### Example @@ -19,6 +23,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount from workplace_console_client.rest import ApiException from pprint import pprint @@ -43,9 +49,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.SubscriptionsApi(api_client) + data = workplace_console_client.OpenExchangeCreateAccount() # OpenExchangeCreateAccount | try: - api_instance.subscriptions_create() + # Create a new email subscription, it will create a new subscription for the domain if emails list is not empty + api_response = api_instance.subscriptions_create(data) + print("The response of SubscriptionsApi->subscriptions_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling SubscriptionsApi->subscriptions_create: %s\n" % e) ``` @@ -54,11 +64,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**OpenExchangeCreateAccount**](OpenExchangeCreateAccount.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -66,19 +79,19 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **subscriptions_create_0** -> subscriptions_create_0(context_id) +# **subscriptions_list** +> subscriptions_list() ### Example @@ -110,22 +123,18 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.SubscriptionsApi(api_client) - context_id = 'context_id_example' # str | try: - api_instance.subscriptions_create_0(context_id) + api_instance.subscriptions_list() except Exception as e: - print("Exception when calling SubscriptionsApi->subscriptions_create_0: %s\n" % e) + print("Exception when calling SubscriptionsApi->subscriptions_list: %s\n" % e) ``` ### Parameters - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **context_id** | **str**| | +This endpoint does not need any parameter. ### Return type @@ -144,12 +153,16 @@ void (empty response body) | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **subscriptions_list** -> subscriptions_list() +# **subscriptions_read** +> SubscriptionsRead200Response subscriptions_read(context_id) + +Get subscription details + +Get subscription details ### Example @@ -157,6 +170,7 @@ void (empty response body) ```python import workplace_console_client +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response from workplace_console_client.rest import ApiException from pprint import pprint @@ -181,22 +195,29 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.SubscriptionsApi(api_client) + context_id = 'context_id_example' # str | try: - api_instance.subscriptions_list() + # Get subscription details + api_response = api_instance.subscriptions_read(context_id) + print("The response of SubscriptionsApi->subscriptions_read:\n") + pprint(api_response) except Exception as e: - print("Exception when calling SubscriptionsApi->subscriptions_list: %s\n" % e) + print("Exception when calling SubscriptionsApi->subscriptions_read: %s\n" % e) ``` ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **context_id** | **str**| | ### Return type -void (empty response body) +[**SubscriptionsRead200Response**](SubscriptionsRead200Response.md) ### Authorization @@ -205,18 +226,22 @@ void (empty response body) ### HTTP request headers - **Content-Type**: Not defined - - **Accept**: Not defined + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **subscriptions_read** -> subscriptions_read(context_id) +# **update_subscription_status** +> ChangeQuotaCreate200Response update_subscription_status(context_id, data) + +Update subscription status, delete, suspend, unsuspend, etc... + +Update subscription status. ### Example @@ -224,6 +249,8 @@ void (empty response body) ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.service_action import ServiceAction from workplace_console_client.rest import ApiException from pprint import pprint @@ -249,11 +276,15 @@ with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.SubscriptionsApi(api_client) context_id = 'context_id_example' # str | + data = workplace_console_client.ServiceAction() # ServiceAction | try: - api_instance.subscriptions_read(context_id) + # Update subscription status, delete, suspend, unsuspend, etc... + api_response = api_instance.update_subscription_status(context_id, data) + print("The response of SubscriptionsApi->update_subscription_status:\n") + pprint(api_response) except Exception as e: - print("Exception when calling SubscriptionsApi->subscriptions_read: %s\n" % e) + print("Exception when calling SubscriptionsApi->update_subscription_status: %s\n" % e) ``` @@ -264,10 +295,11 @@ with workplace_console_client.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- **context_id** | **str**| | + **data** | [**ServiceAction**](ServiceAction.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -275,14 +307,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**200** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/docs/SubscriptionsRead200Response.md b/docs/SubscriptionsRead200Response.md new file mode 100644 index 0000000..8e3134c --- /dev/null +++ b/docs/SubscriptionsRead200Response.md @@ -0,0 +1,31 @@ +# SubscriptionsRead200Response + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**domain_context** | **object** | | [optional] +**user_emails** | **List[object]** | | [optional] +**email_aliases** | **object** | | [optional] + +## Example + +```python +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response + +# TODO update the JSON string below +json = "{}" +# create an instance of SubscriptionsRead200Response from a JSON string +subscriptions_read200_response_instance = SubscriptionsRead200Response.from_json(json) +# print the JSON string representation of the object +print(SubscriptionsRead200Response.to_json()) + +# convert the object into a dict +subscriptions_read200_response_dict = subscriptions_read200_response_instance.to_dict() +# create an instance of SubscriptionsRead200Response from a dict +subscriptions_read200_response_from_dict = SubscriptionsRead200Response.from_dict(subscriptions_read200_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/UpgradeApi.md b/docs/UpgradeApi.md index a48c46b..e8b7535 100644 --- a/docs/UpgradeApi.md +++ b/docs/UpgradeApi.md @@ -4,11 +4,15 @@ All URIs are relative to *http://127.0.0.1:8000/api* Method | HTTP request | Description ------------- | ------------- | ------------- -[**upgrade_create**](UpgradeApi.md#upgrade_create) | **POST** /upgrade/ | +[**upgrade_create**](UpgradeApi.md#upgrade_create) | **POST** /upgrade/ | Upgrade subscription. # **upgrade_create** -> upgrade_create() +> ChangeQuotaCreate200Response upgrade_create(data) + +Upgrade subscription. + +Upgrade subscription. ### Example @@ -16,6 +20,8 @@ Method | HTTP request | Description ```python import workplace_console_client +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.sub_scription_info import SubScriptionInfo from workplace_console_client.rest import ApiException from pprint import pprint @@ -40,9 +46,13 @@ configuration = workplace_console_client.Configuration( with workplace_console_client.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = workplace_console_client.UpgradeApi(api_client) + data = workplace_console_client.SubScriptionInfo() # SubScriptionInfo | try: - api_instance.upgrade_create() + # Upgrade subscription. + api_response = api_instance.upgrade_create(data) + print("The response of UpgradeApi->upgrade_create:\n") + pprint(api_response) except Exception as e: print("Exception when calling UpgradeApi->upgrade_create: %s\n" % e) ``` @@ -51,11 +61,14 @@ with workplace_console_client.ApiClient(configuration) as api_client: ### Parameters -This endpoint does not need any parameter. + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **data** | [**SubScriptionInfo**](SubScriptionInfo.md)| | ### Return type -void (empty response body) +[**ChangeQuotaCreate200Response**](ChangeQuotaCreate200Response.md) ### Authorization @@ -63,14 +76,14 @@ void (empty response body) ### HTTP request headers - - **Content-Type**: Not defined - - **Accept**: Not defined + - **Content-Type**: application/json + - **Accept**: application/json ### HTTP response details | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | | - | +**200** | Success | - | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) diff --git a/setup.py b/setup.py index 9e13f1a..cd3015c 100644 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "workplace-console-client" -VERSION = "1.0.1" +VERSION = "2.0.0" PYTHON_REQUIRES = ">= 3.9" REQUIRES = [ "urllib3 >= 2.1.0, < 3.0.0", @@ -35,23 +35,14 @@ name=NAME, version=VERSION, description="Open Xchange Console", - author="Truehost Cloud", + author="OpenAPI Generator community", author_email="support@truehost.cloud", - url="https://truehost.cloud", + url="", keywords=["OpenAPI", "OpenAPI-Generator", "Open Xchange Console"], - license="Proprietary", - classifiers=[ - 'Development Status :: 5 - Production/Stable', - 'Intended Audience :: Developers', - 'Topic :: Software Development :: Libraries :: Python Modules', - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Programming Language :: Python :: 3.11', - ], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, + license="BSD License", long_description_content_type='text/markdown', long_description="""\ Test description diff --git a/test/test_alias_display.py b/test/test_alias_display.py new file mode 100644 index 0000000..f1da0f6 --- /dev/null +++ b/test/test_alias_display.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.alias_display import AliasDisplay + +class TestAliasDisplay(unittest.TestCase): + """AliasDisplay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> AliasDisplay: + """Test AliasDisplay + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `AliasDisplay` + """ + model = AliasDisplay() + if include_optional: + return AliasDisplay( + id = 56, + primary_email = '0', + name = '0' + ) + else: + return AliasDisplay( + name = '0', + ) + """ + + def testAliasDisplay(self): + """Test AliasDisplay""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_email_quota.py b/test/test_change_email_quota.py new file mode 100644 index 0000000..5dc7536 --- /dev/null +++ b/test/test_change_email_quota.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.change_email_quota import ChangeEmailQuota + +class TestChangeEmailQuota(unittest.TestCase): + """ChangeEmailQuota unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangeEmailQuota: + """Test ChangeEmailQuota + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChangeEmailQuota` + """ + model = ChangeEmailQuota() + if include_optional: + return ChangeEmailQuota( + email = '0', + quota = 56 + ) + else: + return ChangeEmailQuota( + email = '0', + quota = 56, + ) + """ + + def testChangeEmailQuota(self): + """Test ChangeEmailQuota""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_change_quota_create200_response.py b/test/test_change_quota_create200_response.py new file mode 100644 index 0000000..ff752fc --- /dev/null +++ b/test/test_change_quota_create200_response.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response + +class TestChangeQuotaCreate200Response(unittest.TestCase): + """ChangeQuotaCreate200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ChangeQuotaCreate200Response: + """Test ChangeQuotaCreate200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ChangeQuotaCreate200Response` + """ + model = ChangeQuotaCreate200Response() + if include_optional: + return ChangeQuotaCreate200Response( + message = '', + error = '' + ) + else: + return ChangeQuotaCreate200Response( + ) + """ + + def testChangeQuotaCreate200Response(self): + """Test ChangeQuotaCreate200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_alias.py b/test/test_delete_alias.py new file mode 100644 index 0000000..be71c9e --- /dev/null +++ b/test/test_delete_alias.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.delete_alias import DeleteAlias + +class TestDeleteAlias(unittest.TestCase): + """DeleteAlias unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteAlias: + """Test DeleteAlias + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteAlias` + """ + model = DeleteAlias() + if include_optional: + return DeleteAlias( + email = '0', + alias = '0', + domain = '0' + ) + else: + return DeleteAlias( + email = '0', + alias = '0', + domain = '0', + ) + """ + + def testDeleteAlias(self): + """Test DeleteAlias""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_delete_email.py b/test/test_delete_email.py new file mode 100644 index 0000000..95a8298 --- /dev/null +++ b/test/test_delete_email.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.delete_email import DeleteEmail + +class TestDeleteEmail(unittest.TestCase): + """DeleteEmail unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DeleteEmail: + """Test DeleteEmail + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DeleteEmail` + """ + model = DeleteEmail() + if include_optional: + return DeleteEmail( + email = '0', + domain = '0', + subscription = 56 + ) + else: + return DeleteEmail( + email = '0', + domain = '0', + subscription = 56, + ) + """ + + def testDeleteEmail(self): + """Test DeleteEmail""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain.py b/test/test_domain.py new file mode 100644 index 0000000..def2fe4 --- /dev/null +++ b/test/test_domain.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.domain import Domain + +class TestDomain(unittest.TestCase): + """Domain unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> Domain: + """Test Domain + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `Domain` + """ + model = Domain() + if include_optional: + return Domain( + domain = '0' + ) + else: + return Domain( + domain = '0', + ) + """ + + def testDomain(self): + """Test Domain""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_domain_action.py b/test/test_domain_action.py new file mode 100644 index 0000000..a4621be --- /dev/null +++ b/test/test_domain_action.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.domain_action import DomainAction + +class TestDomainAction(unittest.TestCase): + """DomainAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DomainAction: + """Test DomainAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `DomainAction` + """ + model = DomainAction() + if include_optional: + return DomainAction( + action = '0', + domain = '0' + ) + else: + return DomainAction( + action = '0', + domain = '0', + ) + """ + + def testDomainAction(self): + """Test DomainAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_alias.py b/test/test_email_alias.py new file mode 100644 index 0000000..bfaa42c --- /dev/null +++ b/test/test_email_alias.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.email_alias import EmailAlias + +class TestEmailAlias(unittest.TestCase): + """EmailAlias unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmailAlias: + """Test EmailAlias + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmailAlias` + """ + model = EmailAlias() + if include_optional: + return EmailAlias( + email = '0', + domain = '0', + alias = '0' + ) + else: + return EmailAlias( + email = '0', + domain = '0', + alias = '0', + ) + """ + + def testEmailAlias(self): + """Test EmailAlias""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_email_display.py b/test/test_email_display.py new file mode 100644 index 0000000..040e989 --- /dev/null +++ b/test/test_email_display.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.email_display import EmailDisplay + +class TestEmailDisplay(unittest.TestCase): + """EmailDisplay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> EmailDisplay: + """Test EmailDisplay + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `EmailDisplay` + """ + model = EmailDisplay() + if include_optional: + return EmailDisplay( + id = 56, + name = '0', + email_quota = -2147483648, + max_quota = -2147483648, + used_quota = -2147483648, + email_id = -2147483648, + display_name = '', + order = 56 + ) + else: + return EmailDisplay( + name = '0', + ) + """ + + def testEmailDisplay(self): + """Test EmailDisplay""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_import_create_request.py b/test/test_import_create_request.py new file mode 100644 index 0000000..f5f42f0 --- /dev/null +++ b/test/test_import_create_request.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.import_create_request import ImportCreateRequest + +class TestImportCreateRequest(unittest.TestCase): + """ImportCreateRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ImportCreateRequest: + """Test ImportCreateRequest + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ImportCreateRequest` + """ + model = ImportCreateRequest() + if include_optional: + return ImportCreateRequest( + file = bytes(b'blah'), + domain = '' + ) + else: + return ImportCreateRequest( + file = bytes(b'blah'), + domain = '', + ) + """ + + def testImportCreateRequest(self): + """Test ImportCreateRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_open_exchange_create_account.py b/test/test_open_exchange_create_account.py new file mode 100644 index 0000000..969637d --- /dev/null +++ b/test/test_open_exchange_create_account.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount + +class TestOpenExchangeCreateAccount(unittest.TestCase): + """OpenExchangeCreateAccount unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OpenExchangeCreateAccount: + """Test OpenExchangeCreateAccount + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OpenExchangeCreateAccount` + """ + model = OpenExchangeCreateAccount() + if include_optional: + return OpenExchangeCreateAccount( + emails = [ + '0' + ], + domain_name = '0', + subscription = 0, + new_subscription = True + ) + else: + return OpenExchangeCreateAccount( + emails = [ + '0' + ], + domain_name = '0', + subscription = 0, + new_subscription = True, + ) + """ + + def testOpenExchangeCreateAccount(self): + """Test OpenExchangeCreateAccount""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_order_display.py b/test/test_order_display.py new file mode 100644 index 0000000..cae4282 --- /dev/null +++ b/test/test_order_display.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.order_display import OrderDisplay + +class TestOrderDisplay(unittest.TestCase): + """OrderDisplay unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> OrderDisplay: + """Test OrderDisplay + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `OrderDisplay` + """ + model = OrderDisplay() + if include_optional: + return OrderDisplay( + id = 56, + context_id = -2147483648, + domain = '0', + enabled = True, + average_size = -2147483648, + filestore_id = -2147483648, + filestore_name = '', + max_quota = -2147483648, + context_name = '', + used_quota = -2147483648, + gab_mode = '', + is_order_active = True, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + unallocated_quota = -2147483648, + unallocated_alias = -2147483648, + is_alias_calculated = True, + is_alias_synched = True, + last_dns_check = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_dns_valid = True, + client_id = -2147483648, + is_verified = True, + subscription = 56 + ) + else: + return OrderDisplay( + domain = '0', + ) + """ + + def testOrderDisplay(self): + """Test OrderDisplay""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_password_reset.py b/test/test_password_reset.py new file mode 100644 index 0000000..fc02d6e --- /dev/null +++ b/test/test_password_reset.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.password_reset import PasswordReset + +class TestPasswordReset(unittest.TestCase): + """PasswordReset unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> PasswordReset: + """Test PasswordReset + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `PasswordReset` + """ + model = PasswordReset() + if include_optional: + return PasswordReset( + email = '0', + password = '0' + ) + else: + return PasswordReset( + email = '0', + password = '0', + ) + """ + + def testPasswordReset(self): + """Test PasswordReset""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_service_action.py b/test/test_service_action.py new file mode 100644 index 0000000..cdd98b5 --- /dev/null +++ b/test/test_service_action.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.service_action import ServiceAction + +class TestServiceAction(unittest.TestCase): + """ServiceAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ServiceAction: + """Test ServiceAction + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `ServiceAction` + """ + model = ServiceAction() + if include_optional: + return ServiceAction( + action = '0' + ) + else: + return ServiceAction( + action = '0', + ) + """ + + def testServiceAction(self): + """Test ServiceAction""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_sub_scription_info.py b/test/test_sub_scription_info.py new file mode 100644 index 0000000..9bb459d --- /dev/null +++ b/test/test_sub_scription_info.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.sub_scription_info import SubScriptionInfo + +class TestSubScriptionInfo(unittest.TestCase): + """SubScriptionInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubScriptionInfo: + """Test SubScriptionInfo + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubScriptionInfo` + """ + model = SubScriptionInfo() + if include_optional: + return SubScriptionInfo( + domain = '0', + subscription = 56 + ) + else: + return SubScriptionInfo( + domain = '0', + subscription = 56, + ) + """ + + def testSubScriptionInfo(self): + """Test SubScriptionInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_info_create200_response.py b/test/test_subscription_info_create200_response.py new file mode 100644 index 0000000..ef47d21 --- /dev/null +++ b/test/test_subscription_info_create200_response.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response + +class TestSubscriptionInfoCreate200Response(unittest.TestCase): + """SubscriptionInfoCreate200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubscriptionInfoCreate200Response: + """Test SubscriptionInfoCreate200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscriptionInfoCreate200Response` + """ + model = SubscriptionInfoCreate200Response() + if include_optional: + return SubscriptionInfoCreate200Response( + used_emails = 1.337, + remaining_quota = 1.337, + remaining_emails = 1.337, + allowed_emails = 1.337, + allowed_alias = 1.337, + remaining_alias = 1.337, + allowed_quota = 1.337 + ) + else: + return SubscriptionInfoCreate200Response( + ) + """ + + def testSubscriptionInfoCreate200Response(self): + """Test SubscriptionInfoCreate200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscription_info_response.py b/test/test_subscription_info_response.py new file mode 100644 index 0000000..bab455d --- /dev/null +++ b/test/test_subscription_info_response.py @@ -0,0 +1,121 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse + +class TestSubscriptionInfoResponse(unittest.TestCase): + """SubscriptionInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubscriptionInfoResponse: + """Test SubscriptionInfoResponse + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscriptionInfoResponse` + """ + model = SubscriptionInfoResponse() + if include_optional: + return SubscriptionInfoResponse( + info = workplace_console_client.models.order_display.OrderDisplay( + id = 56, + context_id = -2147483648, + domain = '0', + enabled = True, + average_size = -2147483648, + filestore_id = -2147483648, + filestore_name = '', + max_quota = -2147483648, + context_name = '', + used_quota = -2147483648, + gab_mode = '', + is_order_active = True, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + unallocated_quota = -2147483648, + unallocated_alias = -2147483648, + is_alias_calculated = True, + is_alias_synched = True, + last_dns_check = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_dns_valid = True, + client_id = -2147483648, + is_verified = True, + subscription = 56, ), + emails = [ + workplace_console_client.models.email_display.EmailDisplay( + id = 56, + name = '0', + email_quota = -2147483648, + max_quota = -2147483648, + used_quota = -2147483648, + email_id = -2147483648, + display_name = '', + order = 56, ) + ] + ) + else: + return SubscriptionInfoResponse( + info = workplace_console_client.models.order_display.OrderDisplay( + id = 56, + context_id = -2147483648, + domain = '0', + enabled = True, + average_size = -2147483648, + filestore_id = -2147483648, + filestore_name = '', + max_quota = -2147483648, + context_name = '', + used_quota = -2147483648, + gab_mode = '', + is_order_active = True, + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + unallocated_quota = -2147483648, + unallocated_alias = -2147483648, + is_alias_calculated = True, + is_alias_synched = True, + last_dns_check = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + is_dns_valid = True, + client_id = -2147483648, + is_verified = True, + subscription = 56, ), + emails = [ + workplace_console_client.models.email_display.EmailDisplay( + id = 56, + name = '0', + email_quota = -2147483648, + max_quota = -2147483648, + used_quota = -2147483648, + email_id = -2147483648, + display_name = '', + order = 56, ) + ], + ) + """ + + def testSubscriptionInfoResponse(self): + """Test SubscriptionInfoResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_subscriptions_read200_response.py b/test/test_subscriptions_read200_response.py new file mode 100644 index 0000000..64a29ba --- /dev/null +++ b/test/test_subscriptions_read200_response.py @@ -0,0 +1,56 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response + +class TestSubscriptionsRead200Response(unittest.TestCase): + """SubscriptionsRead200Response unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> SubscriptionsRead200Response: + """Test SubscriptionsRead200Response + include_optional is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `SubscriptionsRead200Response` + """ + model = SubscriptionsRead200Response() + if include_optional: + return SubscriptionsRead200Response( + domain_context = None, + user_emails = [ + None + ], + email_aliases = None + ) + else: + return SubscriptionsRead200Response( + ) + """ + + def testSubscriptionsRead200Response(self): + """Test SubscriptionsRead200Response""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main() diff --git a/workplace_console_client/__init__.py b/workplace_console_client/__init__.py index 49627c0..2f30311 100644 --- a/workplace_console_client/__init__.py +++ b/workplace_console_client/__init__.py @@ -46,7 +46,25 @@ from workplace_console_client.exceptions import ApiException # import models into sdk package +from workplace_console_client.models.alias_display import AliasDisplay +from workplace_console_client.models.change_email_quota import ChangeEmailQuota +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_alias import DeleteAlias +from workplace_console_client.models.delete_email import DeleteEmail from workplace_console_client.models.dns_info_create200_response import DnsInfoCreate200Response from workplace_console_client.models.dns_info_create_request import DnsInfoCreateRequest +from workplace_console_client.models.domain import Domain +from workplace_console_client.models.domain_action import DomainAction +from workplace_console_client.models.email_alias import EmailAlias +from workplace_console_client.models.email_display import EmailDisplay +from workplace_console_client.models.import_create_request import ImportCreateRequest +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount +from workplace_console_client.models.order_display import OrderDisplay +from workplace_console_client.models.password_reset import PasswordReset +from workplace_console_client.models.service_action import ServiceAction +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response from workplace_console_client.models.token_obtain_pair import TokenObtainPair from workplace_console_client.models.token_refresh import TokenRefresh diff --git a/workplace_console_client/api/change_quota_api.py b/workplace_console_client/api/change_quota_api.py index c2b2de7..1bc50fa 100644 --- a/workplace_console_client/api/change_quota_api.py +++ b/workplace_console_client/api/change_quota_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_email_quota import ChangeEmailQuota +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def change_quota_create( self, + data: ChangeEmailQuota, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def change_quota_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """change_quota_create + ) -> ChangeQuotaCreate200Response: + """Change email quota. + Change email quota. + :param data: (required) + :type data: ChangeEmailQuota :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def change_quota_create( """ # noqa: E501 _param = self._change_quota_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def change_quota_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def change_quota_create( @validate_call def change_quota_create_with_http_info( self, + data: ChangeEmailQuota, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def change_quota_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """change_quota_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Change email quota. + Change email quota. + :param data: (required) + :type data: ChangeEmailQuota :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def change_quota_create_with_http_info( """ # noqa: E501 _param = self._change_quota_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def change_quota_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def change_quota_create_with_http_info( @validate_call def change_quota_create_without_preload_content( self, + data: ChangeEmailQuota, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def change_quota_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """change_quota_create + """Change email quota. + Change email quota. + :param data: (required) + :type data: ChangeEmailQuota :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def change_quota_create_without_preload_content( """ # noqa: E501 _param = self._change_quota_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def change_quota_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def change_quota_create_without_preload_content( def _change_quota_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _change_quota_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/create_alias_api.py b/workplace_console_client/api/create_alias_api.py index 9aec9b7..2998337 100644 --- a/workplace_console_client/api/create_alias_api.py +++ b/workplace_console_client/api/create_alias_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.email_alias import EmailAlias from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def create_alias_create( self, + data: EmailAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def create_alias_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """create_alias_create + ) -> ChangeQuotaCreate200Response: + """Create email alias. + Create email alias. + :param data: (required) + :type data: EmailAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def create_alias_create( """ # noqa: E501 _param = self._create_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def create_alias_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def create_alias_create( @validate_call def create_alias_create_with_http_info( self, + data: EmailAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def create_alias_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """create_alias_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Create email alias. + Create email alias. + :param data: (required) + :type data: EmailAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def create_alias_create_with_http_info( """ # noqa: E501 _param = self._create_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def create_alias_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def create_alias_create_with_http_info( @validate_call def create_alias_create_without_preload_content( self, + data: EmailAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def create_alias_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """create_alias_create + """Create email alias. + Create email alias. + :param data: (required) + :type data: EmailAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def create_alias_create_without_preload_content( """ # noqa: E501 _param = self._create_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def create_alias_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def create_alias_create_without_preload_content( def _create_alias_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _create_alias_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/delete_alias_api.py b/workplace_console_client/api/delete_alias_api.py index 2a0d60c..3a19961 100644 --- a/workplace_console_client/api/delete_alias_api.py +++ b/workplace_console_client/api/delete_alias_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_alias import DeleteAlias from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def delete_alias_create( self, + data: DeleteAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def delete_alias_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_alias_create + ) -> ChangeQuotaCreate200Response: + """Delete alias. + Delete alias. + :param data: (required) + :type data: DeleteAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def delete_alias_create( """ # noqa: E501 _param = self._delete_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def delete_alias_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def delete_alias_create( @validate_call def delete_alias_create_with_http_info( self, + data: DeleteAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def delete_alias_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_alias_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Delete alias. + Delete alias. + :param data: (required) + :type data: DeleteAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def delete_alias_create_with_http_info( """ # noqa: E501 _param = self._delete_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def delete_alias_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def delete_alias_create_with_http_info( @validate_call def delete_alias_create_without_preload_content( self, + data: DeleteAlias, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def delete_alias_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_alias_create + """Delete alias. + Delete alias. + :param data: (required) + :type data: DeleteAlias :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def delete_alias_create_without_preload_content( """ # noqa: E501 _param = self._delete_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def delete_alias_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def delete_alias_create_without_preload_content( def _delete_alias_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _delete_alias_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/delete_email_api.py b/workplace_console_client/api/delete_email_api.py index d492196..d1c969e 100644 --- a/workplace_console_client/api/delete_email_api.py +++ b/workplace_console_client/api/delete_email_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_email import DeleteEmail from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def delete_email_create( self, + data: DeleteEmail, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def delete_email_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """delete_email_create + ) -> ChangeQuotaCreate200Response: + """Delete email. + Delete email. + :param data: (required) + :type data: DeleteEmail :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def delete_email_create( """ # noqa: E501 _param = self._delete_email_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def delete_email_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def delete_email_create( @validate_call def delete_email_create_with_http_info( self, + data: DeleteEmail, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def delete_email_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """delete_email_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Delete email. + Delete email. + :param data: (required) + :type data: DeleteEmail :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def delete_email_create_with_http_info( """ # noqa: E501 _param = self._delete_email_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def delete_email_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def delete_email_create_with_http_info( @validate_call def delete_email_create_without_preload_content( self, + data: DeleteEmail, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def delete_email_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """delete_email_create + """Delete email. + Delete email. + :param data: (required) + :type data: DeleteEmail :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def delete_email_create_without_preload_content( """ # noqa: E501 _param = self._delete_email_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def delete_email_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def delete_email_create_without_preload_content( def _delete_email_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _delete_email_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/domain_alias_api.py b/workplace_console_client/api/domain_alias_api.py index d8dd470..02a69f2 100644 --- a/workplace_console_client/api/domain_alias_api.py +++ b/workplace_console_client/api/domain_alias_api.py @@ -17,6 +17,9 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from typing import List +from workplace_console_client.models.alias_display import AliasDisplay +from workplace_console_client.models.domain import Domain from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +42,7 @@ def __init__(self, api_client=None) -> None: @validate_call def domain_alias_create( self, + data: Domain, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +55,13 @@ def domain_alias_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """domain_alias_create + ) -> List[AliasDisplay]: + """Get domain alias list. + Get domain alias list. + :param data: (required) + :type data: Domain :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +85,7 @@ def domain_alias_create( """ # noqa: E501 _param = self._domain_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +93,7 @@ def domain_alias_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "List[AliasDisplay]", } response_data = self.api_client.call_api( *_param, @@ -101,6 +109,7 @@ def domain_alias_create( @validate_call def domain_alias_create_with_http_info( self, + data: Domain, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +122,13 @@ def domain_alias_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """domain_alias_create + ) -> ApiResponse[List[AliasDisplay]]: + """Get domain alias list. + Get domain alias list. + :param data: (required) + :type data: Domain :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +152,7 @@ def domain_alias_create_with_http_info( """ # noqa: E501 _param = self._domain_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +160,7 @@ def domain_alias_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "List[AliasDisplay]", } response_data = self.api_client.call_api( *_param, @@ -163,6 +176,7 @@ def domain_alias_create_with_http_info( @validate_call def domain_alias_create_without_preload_content( self, + data: Domain, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +190,12 @@ def domain_alias_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """domain_alias_create + """Get domain alias list. + Get domain alias list. + :param data: (required) + :type data: Domain :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +219,7 @@ def domain_alias_create_without_preload_content( """ # noqa: E501 _param = self._domain_alias_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +227,7 @@ def domain_alias_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "List[AliasDisplay]", } response_data = self.api_client.call_api( *_param, @@ -220,6 +238,7 @@ def domain_alias_create_without_preload_content( def _domain_alias_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +264,31 @@ def _domain_alias_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/domain_api.py b/workplace_console_client/api/domain_api.py index 6fd239f..af979db 100644 --- a/workplace_console_client/api/domain_api.py +++ b/workplace_console_client/api/domain_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.domain_action import DomainAction from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def domain_create( self, + data: DomainAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def domain_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """domain_create + ) -> ChangeQuotaCreate200Response: + """Update domain subscription status, delete, suspend, unsuspend, etc... + Update domain subscription status. + :param data: (required) + :type data: DomainAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def domain_create( """ # noqa: E501 _param = self._domain_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def domain_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def domain_create( @validate_call def domain_create_with_http_info( self, + data: DomainAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def domain_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """domain_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Update domain subscription status, delete, suspend, unsuspend, etc... + Update domain subscription status. + :param data: (required) + :type data: DomainAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def domain_create_with_http_info( """ # noqa: E501 _param = self._domain_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def domain_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def domain_create_with_http_info( @validate_call def domain_create_without_preload_content( self, + data: DomainAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def domain_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """domain_create + """Update domain subscription status, delete, suspend, unsuspend, etc... + Update domain subscription status. + :param data: (required) + :type data: DomainAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def domain_create_without_preload_content( """ # noqa: E501 _param = self._domain_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def domain_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def domain_create_without_preload_content( def _domain_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _domain_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/domain_info_api.py b/workplace_console_client/api/domain_info_api.py index d8e3cb8..90a6208 100644 --- a/workplace_console_client/api/domain_info_api.py +++ b/workplace_console_client/api/domain_info_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def domain_info_create( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def domain_info_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """domain_info_create + ) -> SubscriptionInfoResponse: + """Get domain subscription details. + Get domain subscription details and emails list. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def domain_info_create( """ # noqa: E501 _param = self._domain_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def domain_info_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoResponse", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def domain_info_create( @validate_call def domain_info_create_with_http_info( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def domain_info_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """domain_info_create + ) -> ApiResponse[SubscriptionInfoResponse]: + """Get domain subscription details. + Get domain subscription details and emails list. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def domain_info_create_with_http_info( """ # noqa: E501 _param = self._domain_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def domain_info_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoResponse", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def domain_info_create_with_http_info( @validate_call def domain_info_create_without_preload_content( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def domain_info_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """domain_info_create + """Get domain subscription details. + Get domain subscription details and emails list. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def domain_info_create_without_preload_content( """ # noqa: E501 _param = self._domain_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def domain_info_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoResponse", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def domain_info_create_without_preload_content( def _domain_info_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _domain_info_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/import_api.py b/workplace_console_client/api/import_api.py index 640e395..1a0328d 100644 --- a/workplace_console_client/api/import_api.py +++ b/workplace_console_client/api/import_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.import_create_request import ImportCreateRequest from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def import_create( self, + data: ImportCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def import_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """import_create + ) -> ChangeQuotaCreate200Response: + """Bulk create emails. + Bulk create emails via uploaded file and domain. + :param data: (required) + :type data: ImportCreateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def import_create( """ # noqa: E501 _param = self._import_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def import_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def import_create( @validate_call def import_create_with_http_info( self, + data: ImportCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def import_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """import_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Bulk create emails. + Bulk create emails via uploaded file and domain. + :param data: (required) + :type data: ImportCreateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def import_create_with_http_info( """ # noqa: E501 _param = self._import_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def import_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def import_create_with_http_info( @validate_call def import_create_without_preload_content( self, + data: ImportCreateRequest, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def import_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """import_create + """Bulk create emails. + Bulk create emails via uploaded file and domain. + :param data: (required) + :type data: ImportCreateRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def import_create_without_preload_content( """ # noqa: E501 _param = self._import_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def import_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def import_create_without_preload_content( def _import_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _import_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/reset_password_api.py b/workplace_console_client/api/reset_password_api.py index dafd61c..63849b4 100644 --- a/workplace_console_client/api/reset_password_api.py +++ b/workplace_console_client/api/reset_password_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.password_reset import PasswordReset from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def reset_password_create( self, + data: PasswordReset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def reset_password_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """reset_password_create + ) -> ChangeQuotaCreate200Response: + """Reset subscription email password. + Reset subscription email password. + :param data: (required) + :type data: PasswordReset :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def reset_password_create( """ # noqa: E501 _param = self._reset_password_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def reset_password_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def reset_password_create( @validate_call def reset_password_create_with_http_info( self, + data: PasswordReset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def reset_password_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """reset_password_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Reset subscription email password. + Reset subscription email password. + :param data: (required) + :type data: PasswordReset :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def reset_password_create_with_http_info( """ # noqa: E501 _param = self._reset_password_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def reset_password_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def reset_password_create_with_http_info( @validate_call def reset_password_create_without_preload_content( self, + data: PasswordReset, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def reset_password_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """reset_password_create + """Reset subscription email password. + Reset subscription email password. + :param data: (required) + :type data: PasswordReset :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def reset_password_create_without_preload_content( """ # noqa: E501 _param = self._reset_password_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def reset_password_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def reset_password_create_without_preload_content( def _reset_password_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _reset_password_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/subscription_info_api.py b/workplace_console_client/api/subscription_info_api.py index 7704742..8cf3fc9 100644 --- a/workplace_console_client/api/subscription_info_api.py +++ b/workplace_console_client/api/subscription_info_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def subscription_info_create( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def subscription_info_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """subscription_info_create + ) -> SubscriptionInfoCreate200Response: + """Get subscription usage info. + Get subscription usage info. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def subscription_info_create( """ # noqa: E501 _param = self._subscription_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def subscription_info_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def subscription_info_create( @validate_call def subscription_info_create_with_http_info( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def subscription_info_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """subscription_info_create + ) -> ApiResponse[SubscriptionInfoCreate200Response]: + """Get subscription usage info. + Get subscription usage info. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def subscription_info_create_with_http_info( """ # noqa: E501 _param = self._subscription_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def subscription_info_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def subscription_info_create_with_http_info( @validate_call def subscription_info_create_without_preload_content( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def subscription_info_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """subscription_info_create + """Get subscription usage info. + Get subscription usage info. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def subscription_info_create_without_preload_content( """ # noqa: E501 _param = self._subscription_info_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def subscription_info_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "SubscriptionInfoCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def subscription_info_create_without_preload_content( def _subscription_info_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _subscription_info_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/api/subscriptions_api.py b/workplace_console_client/api/subscriptions_api.py index a6d2488..5e51a8a 100644 --- a/workplace_console_client/api/subscriptions_api.py +++ b/workplace_console_client/api/subscriptions_api.py @@ -18,6 +18,10 @@ from typing_extensions import Annotated from pydantic import StrictStr +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount +from workplace_console_client.models.service_action import ServiceAction +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -40,6 +44,7 @@ def __init__(self, api_client=None) -> None: @validate_call def subscriptions_create( self, + data: OpenExchangeCreateAccount, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -52,10 +57,13 @@ def subscriptions_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """subscriptions_create + ) -> ChangeQuotaCreate200Response: + """Create a new email subscription, it will create a new subscription for the domain if emails list is not empty + Create a new email subscription + :param data: (required) + :type data: OpenExchangeCreateAccount :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -79,6 +87,7 @@ def subscriptions_create( """ # noqa: E501 _param = self._subscriptions_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -86,7 +95,7 @@ def subscriptions_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -102,6 +111,7 @@ def subscriptions_create( @validate_call def subscriptions_create_with_http_info( self, + data: OpenExchangeCreateAccount, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -114,10 +124,13 @@ def subscriptions_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """subscriptions_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Create a new email subscription, it will create a new subscription for the domain if emails list is not empty + Create a new email subscription + :param data: (required) + :type data: OpenExchangeCreateAccount :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -141,6 +154,7 @@ def subscriptions_create_with_http_info( """ # noqa: E501 _param = self._subscriptions_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -148,7 +162,7 @@ def subscriptions_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -164,6 +178,7 @@ def subscriptions_create_with_http_info( @validate_call def subscriptions_create_without_preload_content( self, + data: OpenExchangeCreateAccount, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -177,9 +192,12 @@ def subscriptions_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """subscriptions_create + """Create a new email subscription, it will create a new subscription for the domain if emails list is not empty + Create a new email subscription + :param data: (required) + :type data: OpenExchangeCreateAccount :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -203,6 +221,7 @@ def subscriptions_create_without_preload_content( """ # noqa: E501 _param = self._subscriptions_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -210,7 +229,7 @@ def subscriptions_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -221,6 +240,7 @@ def subscriptions_create_without_preload_content( def _subscriptions_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -246,9 +266,31 @@ def _subscriptions_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -274,9 +316,8 @@ def _subscriptions_create_serialize( @validate_call - def subscriptions_create_0( + def subscriptions_list( self, - context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -290,11 +331,9 @@ def subscriptions_create_0( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> None: - """subscriptions_create_0 + """subscriptions_list - :param context_id: (required) - :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -317,8 +356,7 @@ def subscriptions_create_0( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_create_0_serialize( - context_id=context_id, + _param = self._subscriptions_list_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -326,7 +364,7 @@ def subscriptions_create_0( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': None, } response_data = self.api_client.call_api( *_param, @@ -340,9 +378,8 @@ def subscriptions_create_0( @validate_call - def subscriptions_create_0_with_http_info( + def subscriptions_list_with_http_info( self, - context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -356,11 +393,9 @@ def subscriptions_create_0_with_http_info( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> ApiResponse[None]: - """subscriptions_create_0 + """subscriptions_list - :param context_id: (required) - :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -383,8 +418,7 @@ def subscriptions_create_0_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_create_0_serialize( - context_id=context_id, + _param = self._subscriptions_list_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -392,7 +426,7 @@ def subscriptions_create_0_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': None, } response_data = self.api_client.call_api( *_param, @@ -406,9 +440,8 @@ def subscriptions_create_0_with_http_info( @validate_call - def subscriptions_create_0_without_preload_content( + def subscriptions_list_without_preload_content( self, - context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -422,11 +455,9 @@ def subscriptions_create_0_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """subscriptions_create_0 + """subscriptions_list - :param context_id: (required) - :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -449,8 +480,7 @@ def subscriptions_create_0_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_create_0_serialize( - context_id=context_id, + _param = self._subscriptions_list_serialize( _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -458,7 +488,7 @@ def subscriptions_create_0_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': None, } response_data = self.api_client.call_api( *_param, @@ -467,9 +497,8 @@ def subscriptions_create_0_without_preload_content( return response_data.response - def _subscriptions_create_0_serialize( + def _subscriptions_list_serialize( self, - context_id, _request_auth, _content_type, _headers, @@ -491,8 +520,6 @@ def _subscriptions_create_0_serialize( _body_params: Optional[bytes] = None # process the path parameters - if context_id is not None: - _path_params['context_id'] = context_id # process the query parameters # process the header parameters # process the form parameters @@ -507,8 +534,8 @@ def _subscriptions_create_0_serialize( ] return self.api_client.param_serialize( - method='POST', - resource_path='/subscriptions/{context_id}/', + method='GET', + resource_path='/subscriptions/', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -525,8 +552,9 @@ def _subscriptions_create_0_serialize( @validate_call - def subscriptions_list( + def subscriptions_read( self, + context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -539,10 +567,13 @@ def subscriptions_list( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """subscriptions_list + ) -> SubscriptionsRead200Response: + """Get subscription details + Get subscription details + :param context_id: (required) + :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -565,7 +596,8 @@ def subscriptions_list( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_list_serialize( + _param = self._subscriptions_read_serialize( + context_id=context_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -573,7 +605,7 @@ def subscriptions_list( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "SubscriptionsRead200Response", } response_data = self.api_client.call_api( *_param, @@ -587,8 +619,9 @@ def subscriptions_list( @validate_call - def subscriptions_list_with_http_info( + def subscriptions_read_with_http_info( self, + context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -601,10 +634,13 @@ def subscriptions_list_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """subscriptions_list + ) -> ApiResponse[SubscriptionsRead200Response]: + """Get subscription details + Get subscription details + :param context_id: (required) + :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -627,7 +663,8 @@ def subscriptions_list_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_list_serialize( + _param = self._subscriptions_read_serialize( + context_id=context_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -635,7 +672,7 @@ def subscriptions_list_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "SubscriptionsRead200Response", } response_data = self.api_client.call_api( *_param, @@ -649,8 +686,9 @@ def subscriptions_list_with_http_info( @validate_call - def subscriptions_list_without_preload_content( + def subscriptions_read_without_preload_content( self, + context_id: StrictStr, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -664,9 +702,12 @@ def subscriptions_list_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """subscriptions_list + """Get subscription details + Get subscription details + :param context_id: (required) + :type context_id: str :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -689,7 +730,8 @@ def subscriptions_list_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_list_serialize( + _param = self._subscriptions_read_serialize( + context_id=context_id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -697,7 +739,7 @@ def subscriptions_list_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "SubscriptionsRead200Response", } response_data = self.api_client.call_api( *_param, @@ -706,8 +748,9 @@ def subscriptions_list_without_preload_content( return response_data.response - def _subscriptions_list_serialize( + def _subscriptions_read_serialize( self, + context_id, _request_auth, _content_type, _headers, @@ -729,12 +772,21 @@ def _subscriptions_list_serialize( _body_params: Optional[bytes] = None # process the path parameters + if context_id is not None: + _path_params['context_id'] = context_id # process the query parameters # process the header parameters # process the form parameters # process the body parameter + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) # authentication setting @@ -744,7 +796,7 @@ def _subscriptions_list_serialize( return self.api_client.param_serialize( method='GET', - resource_path='/subscriptions/', + resource_path='/subscriptions/{context_id}/', path_params=_path_params, query_params=_query_params, header_params=_header_params, @@ -761,9 +813,10 @@ def _subscriptions_list_serialize( @validate_call - def subscriptions_read( + def update_subscription_status( self, context_id: StrictStr, + data: ServiceAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -776,12 +829,15 @@ def subscriptions_read( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """subscriptions_read + ) -> ChangeQuotaCreate200Response: + """Update subscription status, delete, suspend, unsuspend, etc... + Update subscription status. :param context_id: (required) :type context_id: str + :param data: (required) + :type data: ServiceAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -804,8 +860,9 @@ def subscriptions_read( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_read_serialize( + _param = self._update_subscription_status_serialize( context_id=context_id, + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -813,7 +870,7 @@ def subscriptions_read( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -827,9 +884,10 @@ def subscriptions_read( @validate_call - def subscriptions_read_with_http_info( + def update_subscription_status_with_http_info( self, context_id: StrictStr, + data: ServiceAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -842,12 +900,15 @@ def subscriptions_read_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """subscriptions_read + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Update subscription status, delete, suspend, unsuspend, etc... + Update subscription status. :param context_id: (required) :type context_id: str + :param data: (required) + :type data: ServiceAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -870,8 +931,9 @@ def subscriptions_read_with_http_info( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_read_serialize( + _param = self._update_subscription_status_serialize( context_id=context_id, + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -879,7 +941,7 @@ def subscriptions_read_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -893,9 +955,10 @@ def subscriptions_read_with_http_info( @validate_call - def subscriptions_read_without_preload_content( + def update_subscription_status_without_preload_content( self, context_id: StrictStr, + data: ServiceAction, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -909,11 +972,14 @@ def subscriptions_read_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """subscriptions_read + """Update subscription status, delete, suspend, unsuspend, etc... + Update subscription status. :param context_id: (required) :type context_id: str + :param data: (required) + :type data: ServiceAction :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -936,8 +1002,9 @@ def subscriptions_read_without_preload_content( :return: Returns the result object. """ # noqa: E501 - _param = self._subscriptions_read_serialize( + _param = self._update_subscription_status_serialize( context_id=context_id, + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -945,7 +1012,7 @@ def subscriptions_read_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '200': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -954,9 +1021,10 @@ def subscriptions_read_without_preload_content( return response_data.response - def _subscriptions_read_serialize( + def _update_subscription_status_serialize( self, context_id, + data, _request_auth, _content_type, _headers, @@ -984,9 +1052,31 @@ def _subscriptions_read_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ @@ -994,7 +1084,7 @@ def _subscriptions_read_serialize( ] return self.api_client.param_serialize( - method='GET', + method='POST', resource_path='/subscriptions/{context_id}/', path_params=_path_params, query_params=_query_params, diff --git a/workplace_console_client/api/upgrade_api.py b/workplace_console_client/api/upgrade_api.py index 375aa4a..8e5b9ec 100644 --- a/workplace_console_client/api/upgrade_api.py +++ b/workplace_console_client/api/upgrade_api.py @@ -17,6 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union from typing_extensions import Annotated +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.sub_scription_info import SubScriptionInfo from workplace_console_client.api_client import ApiClient, RequestSerialized from workplace_console_client.api_response import ApiResponse @@ -39,6 +41,7 @@ def __init__(self, api_client=None) -> None: @validate_call def upgrade_create( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -51,10 +54,13 @@ def upgrade_create( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """upgrade_create + ) -> ChangeQuotaCreate200Response: + """Upgrade subscription. + Upgrade subscription. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -78,6 +84,7 @@ def upgrade_create( """ # noqa: E501 _param = self._upgrade_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -85,7 +92,7 @@ def upgrade_create( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -101,6 +108,7 @@ def upgrade_create( @validate_call def upgrade_create_with_http_info( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -113,10 +121,13 @@ def upgrade_create_with_http_info( _content_type: Optional[StrictStr] = None, _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """upgrade_create + ) -> ApiResponse[ChangeQuotaCreate200Response]: + """Upgrade subscription. + Upgrade subscription. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -140,6 +151,7 @@ def upgrade_create_with_http_info( """ # noqa: E501 _param = self._upgrade_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -147,7 +159,7 @@ def upgrade_create_with_http_info( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -163,6 +175,7 @@ def upgrade_create_with_http_info( @validate_call def upgrade_create_without_preload_content( self, + data: SubScriptionInfo, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -176,9 +189,12 @@ def upgrade_create_without_preload_content( _headers: Optional[Dict[StrictStr, Any]] = None, _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, ) -> RESTResponseType: - """upgrade_create + """Upgrade subscription. + Upgrade subscription. + :param data: (required) + :type data: SubScriptionInfo :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of @@ -202,6 +218,7 @@ def upgrade_create_without_preload_content( """ # noqa: E501 _param = self._upgrade_create_serialize( + data=data, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, @@ -209,7 +226,7 @@ def upgrade_create_without_preload_content( ) _response_types_map: Dict[str, Optional[str]] = { - '201': None, + '200': "ChangeQuotaCreate200Response", } response_data = self.api_client.call_api( *_param, @@ -220,6 +237,7 @@ def upgrade_create_without_preload_content( def _upgrade_create_serialize( self, + data, _request_auth, _content_type, _headers, @@ -245,9 +263,31 @@ def _upgrade_create_serialize( # process the header parameters # process the form parameters # process the body parameter - - - + if data is not None: + _body_params = data + + + # set the HTTP header `Accept` + if 'Accept' not in _header_params: + _header_params['Accept'] = self.api_client.select_header_accept( + [ + 'application/json' + ] + ) + + # set the HTTP header `Content-Type` + if _content_type: + _header_params['Content-Type'] = _content_type + else: + _default_content_type = ( + self.api_client.select_header_content_type( + [ + 'application/json' + ] + ) + ) + if _default_content_type is not None: + _header_params['Content-Type'] = _default_content_type # authentication setting _auth_settings: List[str] = [ diff --git a/workplace_console_client/models/__init__.py b/workplace_console_client/models/__init__.py index b246499..1bef251 100644 --- a/workplace_console_client/models/__init__.py +++ b/workplace_console_client/models/__init__.py @@ -15,7 +15,25 @@ # import models into model package +from workplace_console_client.models.alias_display import AliasDisplay +from workplace_console_client.models.change_email_quota import ChangeEmailQuota +from workplace_console_client.models.change_quota_create200_response import ChangeQuotaCreate200Response +from workplace_console_client.models.delete_alias import DeleteAlias +from workplace_console_client.models.delete_email import DeleteEmail from workplace_console_client.models.dns_info_create200_response import DnsInfoCreate200Response from workplace_console_client.models.dns_info_create_request import DnsInfoCreateRequest +from workplace_console_client.models.domain import Domain +from workplace_console_client.models.domain_action import DomainAction +from workplace_console_client.models.email_alias import EmailAlias +from workplace_console_client.models.email_display import EmailDisplay +from workplace_console_client.models.import_create_request import ImportCreateRequest +from workplace_console_client.models.open_exchange_create_account import OpenExchangeCreateAccount +from workplace_console_client.models.order_display import OrderDisplay +from workplace_console_client.models.password_reset import PasswordReset +from workplace_console_client.models.service_action import ServiceAction +from workplace_console_client.models.sub_scription_info import SubScriptionInfo +from workplace_console_client.models.subscription_info_create200_response import SubscriptionInfoCreate200Response +from workplace_console_client.models.subscription_info_response import SubscriptionInfoResponse +from workplace_console_client.models.subscriptions_read200_response import SubscriptionsRead200Response from workplace_console_client.models.token_obtain_pair import TokenObtainPair from workplace_console_client.models.token_refresh import TokenRefresh diff --git a/workplace_console_client/models/alias_display.py b/workplace_console_client/models/alias_display.py new file mode 100644 index 0000000..d79475b --- /dev/null +++ b/workplace_console_client/models/alias_display.py @@ -0,0 +1,97 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class AliasDisplay(BaseModel): + """ + AliasDisplay + """ # noqa: E501 + id: Optional[StrictInt] = None + primary_email: Optional[Annotated[str, Field(min_length=1, strict=True)]] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=254)] + __properties: ClassVar[List[str]] = ["id", "primary_email", "name"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of AliasDisplay from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "primary_email", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of AliasDisplay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "primary_email": obj.get("primary_email"), + "name": obj.get("name") + }) + return _obj + + diff --git a/workplace_console_client/models/change_email_quota.py b/workplace_console_client/models/change_email_quota.py new file mode 100644 index 0000000..ec69fcd --- /dev/null +++ b/workplace_console_client/models/change_email_quota.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ChangeEmailQuota(BaseModel): + """ + ChangeEmailQuota + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True)] + quota: StrictInt + __properties: ClassVar[List[str]] = ["email", "quota"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeEmailQuota from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeEmailQuota from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "quota": obj.get("quota") + }) + return _obj + + diff --git a/workplace_console_client/models/change_quota_create200_response.py b/workplace_console_client/models/change_quota_create200_response.py new file mode 100644 index 0000000..93ff6b2 --- /dev/null +++ b/workplace_console_client/models/change_quota_create200_response.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class ChangeQuotaCreate200Response(BaseModel): + """ + ChangeQuotaCreate200Response + """ # noqa: E501 + message: Optional[StrictStr] = None + error: Optional[StrictStr] = None + __properties: ClassVar[List[str]] = ["message", "error"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ChangeQuotaCreate200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ChangeQuotaCreate200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "message": obj.get("message"), + "error": obj.get("error") + }) + return _obj + + diff --git a/workplace_console_client/models/delete_alias.py b/workplace_console_client/models/delete_alias.py new file mode 100644 index 0000000..71535c8 --- /dev/null +++ b/workplace_console_client/models/delete_alias.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeleteAlias(BaseModel): + """ + DeleteAlias + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True)] + alias: Annotated[str, Field(min_length=1, strict=True)] + domain: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["email", "alias", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteAlias from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteAlias from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "alias": obj.get("alias"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/workplace_console_client/models/delete_email.py b/workplace_console_client/models/delete_email.py new file mode 100644 index 0000000..9598481 --- /dev/null +++ b/workplace_console_client/models/delete_email.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DeleteEmail(BaseModel): + """ + DeleteEmail + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True)] + domain: Annotated[str, Field(min_length=1, strict=True)] + subscription: StrictInt + __properties: ClassVar[List[str]] = ["email", "domain", "subscription"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DeleteEmail from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DeleteEmail from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "domain": obj.get("domain"), + "subscription": obj.get("subscription") + }) + return _obj + + diff --git a/workplace_console_client/models/dns_info_create200_response.py b/workplace_console_client/models/dns_info_create200_response.py index 6c1c052..63bc8df 100644 --- a/workplace_console_client/models/dns_info_create200_response.py +++ b/workplace_console_client/models/dns_info_create200_response.py @@ -18,8 +18,8 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr -from typing import Any, ClassVar, Dict, List, Optional +from pydantic import BaseModel, ConfigDict, StrictFloat, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional, Union from typing import Optional, Set from typing_extensions import Self @@ -27,9 +27,17 @@ class DnsInfoCreate200Response(BaseModel): """ DnsInfoCreate200Response """ # noqa: E501 - score: Optional[StrictInt] = None + score: Union[StrictFloat, StrictInt] message: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["score", "message"] + domain: Optional[StrictStr] = None + all_dns_score: Optional[Union[StrictFloat, StrictInt]] = None + found: Optional[Union[StrictFloat, StrictInt]] = None + total: Optional[Union[StrictFloat, StrictInt]] = None + missing_dns: Optional[List[Dict[str, Any]]] = None + other_missing_dns: Optional[List[Dict[str, Any]]] = None + found_dns: Optional[Dict[str, Any]] = None + error: Optional[List[StrictStr]] = None + __properties: ClassVar[List[str]] = ["score", "message", "domain", "all_dns_score", "found", "total", "missing_dns", "other_missing_dns", "found_dns", "error"] model_config = ConfigDict( populate_by_name=True, @@ -83,7 +91,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "score": obj.get("score"), - "message": obj.get("message") + "message": obj.get("message"), + "domain": obj.get("domain"), + "all_dns_score": obj.get("all_dns_score"), + "found": obj.get("found"), + "total": obj.get("total"), + "missing_dns": obj.get("missing_dns"), + "other_missing_dns": obj.get("other_missing_dns"), + "found_dns": obj.get("found_dns"), + "error": obj.get("error") }) return _obj diff --git a/workplace_console_client/models/domain.py b/workplace_console_client/models/domain.py new file mode 100644 index 0000000..c16172d --- /dev/null +++ b/workplace_console_client/models/domain.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class Domain(BaseModel): + """ + Domain + """ # noqa: E501 + domain: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of Domain from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of Domain from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain") + }) + return _obj + + diff --git a/workplace_console_client/models/domain_action.py b/workplace_console_client/models/domain_action.py new file mode 100644 index 0000000..4332bca --- /dev/null +++ b/workplace_console_client/models/domain_action.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class DomainAction(BaseModel): + """ + DomainAction + """ # noqa: E501 + action: Annotated[str, Field(min_length=1, strict=True)] + domain: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["action", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of DomainAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of DomainAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/workplace_console_client/models/email_alias.py b/workplace_console_client/models/email_alias.py new file mode 100644 index 0000000..79ce77f --- /dev/null +++ b/workplace_console_client/models/email_alias.py @@ -0,0 +1,93 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EmailAlias(BaseModel): + """ + EmailAlias + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True)] + domain: Annotated[str, Field(min_length=1, strict=True)] + alias: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["email", "domain", "alias"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmailAlias from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmailAlias from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "domain": obj.get("domain"), + "alias": obj.get("alias") + }) + return _obj + + diff --git a/workplace_console_client/models/email_display.py b/workplace_console_client/models/email_display.py new file mode 100644 index 0000000..6208af8 --- /dev/null +++ b/workplace_console_client/models/email_display.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class EmailDisplay(BaseModel): + """ + EmailDisplay + """ # noqa: E501 + id: Optional[StrictInt] = None + name: Annotated[str, Field(min_length=1, strict=True, max_length=254)] + email_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = Field(default=None, description="Email qoata in GB") + max_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = Field(default=None, description="Max email qoata in GB") + used_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = Field(default=None, description="Used qoata in GB") + email_id: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + display_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + order: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "name", "email_quota", "max_quota", "used_quota", "email_id", "display_name", "order"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of EmailDisplay from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if email_id (nullable) is None + # and model_fields_set contains the field + if self.email_id is None and "email_id" in self.model_fields_set: + _dict['email_id'] = None + + # set to None if display_name (nullable) is None + # and model_fields_set contains the field + if self.display_name is None and "display_name" in self.model_fields_set: + _dict['display_name'] = None + + # set to None if order (nullable) is None + # and model_fields_set contains the field + if self.order is None and "order" in self.model_fields_set: + _dict['order'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of EmailDisplay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "name": obj.get("name"), + "email_quota": obj.get("email_quota"), + "max_quota": obj.get("max_quota"), + "used_quota": obj.get("used_quota"), + "email_id": obj.get("email_id"), + "display_name": obj.get("display_name"), + "order": obj.get("order") + }) + return _obj + + diff --git a/workplace_console_client/models/import_create_request.py b/workplace_console_client/models/import_create_request.py new file mode 100644 index 0000000..a1e0358 --- /dev/null +++ b/workplace_console_client/models/import_create_request.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBytes, StrictStr +from typing import Any, ClassVar, Dict, List, Tuple, Union +from typing import Optional, Set +from typing_extensions import Self + +class ImportCreateRequest(BaseModel): + """ + ImportCreateRequest + """ # noqa: E501 + file: Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]] = Field(description="CSV or excel file containing email accounts") + domain: StrictStr = Field(description="Domain to associate with emails") + __properties: ClassVar[List[str]] = ["file", "domain"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ImportCreateRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ImportCreateRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "file": obj.get("file"), + "domain": obj.get("domain") + }) + return _obj + + diff --git a/workplace_console_client/models/open_exchange_create_account.py b/workplace_console_client/models/open_exchange_create_account.py new file mode 100644 index 0000000..ef00225 --- /dev/null +++ b/workplace_console_client/models/open_exchange_create_account.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OpenExchangeCreateAccount(BaseModel): + """ + OpenExchangeCreateAccount + """ # noqa: E501 + emails: List[Annotated[str, Field(min_length=1, strict=True)]] + domain_name: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + subscription: Annotated[int, Field(strict=True, ge=0)] + new_subscription: StrictBool + __properties: ClassVar[List[str]] = ["emails", "domain_name", "subscription", "new_subscription"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OpenExchangeCreateAccount from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OpenExchangeCreateAccount from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "emails": obj.get("emails"), + "domain_name": obj.get("domain_name"), + "subscription": obj.get("subscription"), + "new_subscription": obj.get("new_subscription") + }) + return _obj + + diff --git a/workplace_console_client/models/order_display.py b/workplace_console_client/models/order_display.py new file mode 100644 index 0000000..487ed2c --- /dev/null +++ b/workplace_console_client/models/order_display.py @@ -0,0 +1,175 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from datetime import datetime +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt +from typing import Any, ClassVar, Dict, List, Optional +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class OrderDisplay(BaseModel): + """ + OrderDisplay + """ # noqa: E501 + id: Optional[StrictInt] = None + context_id: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + domain: Annotated[str, Field(min_length=1, strict=True, max_length=255)] + enabled: Optional[StrictBool] = None + average_size: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + filestore_id: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + filestore_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + max_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + context_name: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + used_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + gab_mode: Optional[Annotated[str, Field(strict=True, max_length=255)]] = None + is_order_active: Optional[StrictBool] = None + updated_at: Optional[datetime] = None + created_at: Optional[datetime] = None + unallocated_quota: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + unallocated_alias: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + is_alias_calculated: Optional[StrictBool] = None + is_alias_synched: Optional[StrictBool] = None + last_dns_check: Optional[datetime] = None + is_dns_valid: Optional[StrictBool] = None + client_id: Optional[Annotated[int, Field(le=2147483647, strict=True, ge=-2147483648)]] = None + is_verified: Optional[StrictBool] = None + subscription: Optional[StrictInt] = None + __properties: ClassVar[List[str]] = ["id", "context_id", "domain", "enabled", "average_size", "filestore_id", "filestore_name", "max_quota", "context_name", "used_quota", "gab_mode", "is_order_active", "updated_at", "created_at", "unallocated_quota", "unallocated_alias", "is_alias_calculated", "is_alias_synched", "last_dns_check", "is_dns_valid", "client_id", "is_verified", "subscription"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of OrderDisplay from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + * OpenAPI `readOnly` fields are excluded. + """ + excluded_fields: Set[str] = set([ + "id", + "updated_at", + "created_at", + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # set to None if context_id (nullable) is None + # and model_fields_set contains the field + if self.context_id is None and "context_id" in self.model_fields_set: + _dict['context_id'] = None + + # set to None if filestore_name (nullable) is None + # and model_fields_set contains the field + if self.filestore_name is None and "filestore_name" in self.model_fields_set: + _dict['filestore_name'] = None + + # set to None if context_name (nullable) is None + # and model_fields_set contains the field + if self.context_name is None and "context_name" in self.model_fields_set: + _dict['context_name'] = None + + # set to None if gab_mode (nullable) is None + # and model_fields_set contains the field + if self.gab_mode is None and "gab_mode" in self.model_fields_set: + _dict['gab_mode'] = None + + # set to None if last_dns_check (nullable) is None + # and model_fields_set contains the field + if self.last_dns_check is None and "last_dns_check" in self.model_fields_set: + _dict['last_dns_check'] = None + + # set to None if client_id (nullable) is None + # and model_fields_set contains the field + if self.client_id is None and "client_id" in self.model_fields_set: + _dict['client_id'] = None + + # set to None if subscription (nullable) is None + # and model_fields_set contains the field + if self.subscription is None and "subscription" in self.model_fields_set: + _dict['subscription'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of OrderDisplay from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "id": obj.get("id"), + "context_id": obj.get("context_id"), + "domain": obj.get("domain"), + "enabled": obj.get("enabled"), + "average_size": obj.get("average_size"), + "filestore_id": obj.get("filestore_id"), + "filestore_name": obj.get("filestore_name"), + "max_quota": obj.get("max_quota"), + "context_name": obj.get("context_name"), + "used_quota": obj.get("used_quota"), + "gab_mode": obj.get("gab_mode"), + "is_order_active": obj.get("is_order_active"), + "updated_at": obj.get("updated_at"), + "created_at": obj.get("created_at"), + "unallocated_quota": obj.get("unallocated_quota"), + "unallocated_alias": obj.get("unallocated_alias"), + "is_alias_calculated": obj.get("is_alias_calculated"), + "is_alias_synched": obj.get("is_alias_synched"), + "last_dns_check": obj.get("last_dns_check"), + "is_dns_valid": obj.get("is_dns_valid"), + "client_id": obj.get("client_id"), + "is_verified": obj.get("is_verified"), + "subscription": obj.get("subscription") + }) + return _obj + + diff --git a/workplace_console_client/models/password_reset.py b/workplace_console_client/models/password_reset.py new file mode 100644 index 0000000..0298982 --- /dev/null +++ b/workplace_console_client/models/password_reset.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class PasswordReset(BaseModel): + """ + PasswordReset + """ # noqa: E501 + email: Annotated[str, Field(min_length=1, strict=True)] + password: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["email", "password"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of PasswordReset from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of PasswordReset from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "email": obj.get("email"), + "password": obj.get("password") + }) + return _obj + + diff --git a/workplace_console_client/models/service_action.py b/workplace_console_client/models/service_action.py new file mode 100644 index 0000000..af1dfc1 --- /dev/null +++ b/workplace_console_client/models/service_action.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class ServiceAction(BaseModel): + """ + ServiceAction + """ # noqa: E501 + action: Annotated[str, Field(min_length=1, strict=True)] + __properties: ClassVar[List[str]] = ["action"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of ServiceAction from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ServiceAction from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "action": obj.get("action") + }) + return _obj + + diff --git a/workplace_console_client/models/sub_scription_info.py b/workplace_console_client/models/sub_scription_info.py new file mode 100644 index 0000000..ed8b738 --- /dev/null +++ b/workplace_console_client/models/sub_scription_info.py @@ -0,0 +1,91 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictInt +from typing import Any, ClassVar, Dict, List +from typing_extensions import Annotated +from typing import Optional, Set +from typing_extensions import Self + +class SubScriptionInfo(BaseModel): + """ + SubScriptionInfo + """ # noqa: E501 + domain: Annotated[str, Field(min_length=1, strict=True)] + subscription: StrictInt + __properties: ClassVar[List[str]] = ["domain", "subscription"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubScriptionInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubScriptionInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain": obj.get("domain"), + "subscription": obj.get("subscription") + }) + return _obj + + diff --git a/workplace_console_client/models/subscription_info_create200_response.py b/workplace_console_client/models/subscription_info_create200_response.py new file mode 100644 index 0000000..af506b5 --- /dev/null +++ b/workplace_console_client/models/subscription_info_create200_response.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt +from typing import Any, ClassVar, Dict, List, Optional, Union +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionInfoCreate200Response(BaseModel): + """ + SubscriptionInfoCreate200Response + """ # noqa: E501 + used_emails: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="used-emails") + remaining_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="remaining-quota") + remaining_emails: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="remaining-emails") + allowed_emails: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="allowed-emails") + allowed_alias: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="allowed-alias") + remaining_alias: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="remaining-alias") + allowed_quota: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, alias="allowed-quota") + __properties: ClassVar[List[str]] = ["used-emails", "remaining-quota", "remaining-emails", "allowed-emails", "allowed-alias", "remaining-alias", "allowed-quota"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionInfoCreate200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionInfoCreate200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "used-emails": obj.get("used-emails"), + "remaining-quota": obj.get("remaining-quota"), + "remaining-emails": obj.get("remaining-emails"), + "allowed-emails": obj.get("allowed-emails"), + "allowed-alias": obj.get("allowed-alias"), + "remaining-alias": obj.get("remaining-alias"), + "allowed-quota": obj.get("allowed-quota") + }) + return _obj + + diff --git a/workplace_console_client/models/subscription_info_response.py b/workplace_console_client/models/subscription_info_response.py new file mode 100644 index 0000000..06827f5 --- /dev/null +++ b/workplace_console_client/models/subscription_info_response.py @@ -0,0 +1,102 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from workplace_console_client.models.email_display import EmailDisplay +from workplace_console_client.models.order_display import OrderDisplay +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionInfoResponse(BaseModel): + """ + SubscriptionInfoResponse + """ # noqa: E501 + info: OrderDisplay + emails: List[EmailDisplay] + __properties: ClassVar[List[str]] = ["info", "emails"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionInfoResponse from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of info + if self.info: + _dict['info'] = self.info.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in emails (list) + _items = [] + if self.emails: + for _item_emails in self.emails: + if _item_emails: + _items.append(_item_emails.to_dict()) + _dict['emails'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionInfoResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "info": OrderDisplay.from_dict(obj["info"]) if obj.get("info") is not None else None, + "emails": [EmailDisplay.from_dict(_item) for _item in obj["emails"]] if obj.get("emails") is not None else None + }) + return _obj + + diff --git a/workplace_console_client/models/subscriptions_read200_response.py b/workplace_console_client/models/subscriptions_read200_response.py new file mode 100644 index 0000000..37d924f --- /dev/null +++ b/workplace_console_client/models/subscriptions_read200_response.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Open Xchange Console + + Test description + + The version of the OpenAPI document: v1 + Contact: support@truehost.cloud + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + +class SubscriptionsRead200Response(BaseModel): + """ + SubscriptionsRead200Response + """ # noqa: E501 + domain_context: Optional[Dict[str, Any]] = None + user_emails: Optional[List[Dict[str, Any]]] = None + email_aliases: Optional[Dict[str, Any]] = None + __properties: ClassVar[List[str]] = ["domain_context", "user_emails", "email_aliases"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of SubscriptionsRead200Response from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of SubscriptionsRead200Response from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "domain_context": obj.get("domain_context"), + "user_emails": obj.get("user_emails"), + "email_aliases": obj.get("email_aliases") + }) + return _obj + + From f343892e8c2ab24ab5b1335ec612f30c363b1bbc Mon Sep 17 00:00:00 2001 From: Patience Igiraneza Date: Wed, 4 Jun 2025 15:34:18 +0200 Subject: [PATCH 2/2] Update readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e657c4e..1fbeecf 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # workplace-console-client -Test description +This is the Truehost's pip package for using the workplace console API from other python applications. This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: @@ -18,9 +18,9 @@ Python 3.9+ If the python package is hosted on a repository, you can install directly using: ```sh -pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git +pip install git+https://github.com/truehostcloud/workplace-console-client.git ``` -(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) +(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/truehostcloud/workplace-console-client.git`) Then import the package: ```python